Merge pull request #871 from mlguerrero12/fixwastedassignlinter

Fix wastedassign linter errors
This commit is contained in:
Casey Callendrello 2023-04-04 15:23:28 +02:00 committed by GitHub
commit 6f6345ca05
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,6 @@ func (s *Store) FindByID(id string, ifname string) bool {
s.Lock() s.Lock()
defer s.Unlock() defer s.Unlock()
found := false
match := strings.TrimSpace(id) + LineBreak + ifname match := strings.TrimSpace(id) + LineBreak + ifname
found, err := s.FindByKey(match) found, err := s.FindByKey(match)
@ -155,7 +154,6 @@ func (s *Store) ReleaseByKey(match string) (bool, error) {
// N.B. This function eats errors to be tolerant and // N.B. This function eats errors to be tolerant and
// release as much as possible // release as much as possible
func (s *Store) ReleaseByID(id string, ifname string) error { func (s *Store) ReleaseByID(id string, ifname string) error {
found := false
match := strings.TrimSpace(id) + LineBreak + ifname match := strings.TrimSpace(id) + LineBreak + ifname
found, err := s.ReleaseByKey(match) found, err := s.ReleaseByKey(match)