From 758c4c7279915902e3b4ec067db6ed19cb55f69d Mon Sep 17 00:00:00 2001 From: Daniel Hall Date: Wed, 26 Jun 2024 15:49:41 -0700 Subject: [PATCH] lint: Fixed ineffassign on Add --- ldap/ldap.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/ldap/ldap.go b/ldap/ldap.go index 06405ee..8be9565 100644 --- a/ldap/ldap.go +++ b/ldap/ldap.go @@ -17,14 +17,11 @@ var ldapStore = make(LDAPStore) type LDAPStore map[string]CachedLDAPpassword // Add caches a password username set. -func (store *LDAPStore) Add(username, password string) { - newStore := *store - newStore[username] = CachedLDAPpassword{ +func (store LDAPStore) Add(username, password string) { + store[username] = CachedLDAPpassword{ Password: password, ExpiresAt: time.Now().Add(time.Hour * 8), // Keep the password valid for 8 hours. } - - store = &newStore } // IsValid checks if a user's password is stored in the cache and checks if a