From f9de42e8013108ea27b33cf9185fffb96f612597 Mon Sep 17 00:00:00 2001 From: Aaron Bieber Date: Thu, 9 Dec 2021 05:48:34 -0700 Subject: [PATCH] Don't assign var --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index aeab934..4d81f1b 100644 --- a/main.go +++ b/main.go @@ -63,9 +63,9 @@ type userHandler struct { type userHandlers []userHandler func (u userHandlers) find(name string) *userHandler { - for _, usr := range u { - if usr.name == name { - return &usr + for i := range u { + if u[i].name == name { + return &u[i] } } return nil