From f04c271f786f4b5b1f666aad27ed22d9ca1bbd0d Mon Sep 17 00:00:00 2001 From: Grant McCloskey Date: Sat, 4 Jun 2022 01:28:26 -0700 Subject: [PATCH] [Minor] Bad practice to have a mix of Receiver types. (#491) I was using an old version and saw that ``` r.contentEncodingEnabled = &enabled ``` Fix was added, however String() should be updated to also use a pointer receiver. Per Golang Docs "In general, all methods on a given type should have either value or pointer receivers, but not a mixture of both." --- route.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/route.go b/route.go index 4cab0318..193f4a6b 100644 --- a/route.go +++ b/route.go @@ -168,7 +168,7 @@ func tokenizePath(path string) []string { } // for debugging -func (r Route) String() string { +func (r *Route) String() string { return r.Method + " " + r.Path }