Skip to content

Commit

Permalink
[Minor] Bad practice to have a mix of Receiver types. (#491)
Browse files Browse the repository at this point in the history
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."
  • Loading branch information
MushuEE authored Jun 4, 2022
1 parent 7c971ca commit f04c271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion route.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit f04c271

Please sign in to comment.