Don't assign var
This commit is contained in:
parent
4fdac0116f
commit
f9de42e801
6
main.go
6
main.go
@ -63,9 +63,9 @@ type userHandler struct {
|
|||||||
type userHandlers []userHandler
|
type userHandlers []userHandler
|
||||||
|
|
||||||
func (u userHandlers) find(name string) *userHandler {
|
func (u userHandlers) find(name string) *userHandler {
|
||||||
for _, usr := range u {
|
for i := range u {
|
||||||
if usr.name == name {
|
if u[i].name == name {
|
||||||
return &usr
|
return &u[i]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user