From e350d53954f7e508560d41abcd0424d6788a82fc Mon Sep 17 00:00:00 2001 From: Cadey Dodrill Date: Sun, 22 Jan 2017 09:48:14 -0800 Subject: [PATCH] cmd/helloserver: print headers more pretty --- cmd/helloserver/main.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmd/helloserver/main.go b/cmd/helloserver/main.go index d7d7fd9..65244c9 100644 --- a/cmd/helloserver/main.go +++ b/cmd/helloserver/main.go @@ -4,6 +4,8 @@ import ( "flag" "fmt" "net/http" + + "github.com/kr/pretty" ) var ( @@ -17,5 +19,5 @@ func main() { func handle(w http.ResponseWriter, r *http.Request) { fmt.Fprintln(w, "Route is go!") - fmt.Fprintf(w, "%#v\n", r.Header) + fmt.Fprintf(w, "%s\n", pretty.Sprint(r.Header)) }