From 786d36e5ab042d67efe94022439cf6c91ee711dc Mon Sep 17 00:00:00 2001 From: Jingwen Owen Ou Date: Mon, 7 Mar 2016 11:42:43 -0800 Subject: [PATCH] `go fmt` --- mux.go | 12 ++++++------ route.go | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/mux.go b/mux.go index b399699..c982c13 100644 --- a/mux.go +++ b/mux.go @@ -79,12 +79,12 @@ func (r *Router) ServeHTTP(w http.ResponseWriter, req *http.Request) { // Clean path to canonical form and redirect. if p := cleanPath(req.URL.Path); p != req.URL.Path { - // Added 3 lines (Philip Schlump) - It was dropping the query string and #whatever from query. - // This matches with fix in go 1.2 r.c. 4 for same problem. Go Issue: - // http://code.google.com/p/go/issues/detail?id=5252 - url := *req.URL - url.Path = p - p = url.String() + // Added 3 lines (Philip Schlump) - It was dropping the query string and #whatever from query. + // This matches with fix in go 1.2 r.c. 4 for same problem. Go Issue: + // http://code.google.com/p/go/issues/detail?id=5252 + url := *req.URL + url.Path = p + p = url.String() w.Header().Set("Location", p) w.WriteHeader(http.StatusMovedPermanently) diff --git a/route.go b/route.go index 6f1ef38..ca54610 100644 --- a/route.go +++ b/route.go @@ -23,12 +23,12 @@ type Route struct { matchers []matcher // Manager for the variables from host and path. regexp *routeRegexpGroup - // If true, when the path pattern is "/path/", accessing "/path" will - // redirect to the former and vice versa. - strictSlash bool - // If true, when the path pattern is "/path//to", accessing "/path//to" - // will not redirect - skipClean bool + // If true, when the path pattern is "/path/", accessing "/path" will + // redirect to the former and vice versa. + strictSlash bool + // If true, when the path pattern is "/path//to", accessing "/path//to" + // will not redirect + skipClean bool // If true, this route never matches: it is only used to build URLs. buildOnly bool // The name used to build URLs.