enable staticcheck linter

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
Matthieu MOREL
2023-03-02 11:06:22 +01:00
committed by GitHub
parent d12b81dec5
commit 177e0bf2d9
8 changed files with 33 additions and 14 deletions

View File

@ -125,7 +125,7 @@ func (s *Store) FindByID(id string, ifname string) bool {
// Match anything created by this id
if !found && err == nil {
match := strings.TrimSpace(id)
found, err = s.FindByKey(id, ifname, match)
found, _ = s.FindByKey(id, ifname, match)
}
return found
@ -162,7 +162,7 @@ func (s *Store) ReleaseByID(id string, ifname string) error {
// For backwards compatibility, look for files written by a previous version
if !found && err == nil {
match := strings.TrimSpace(id)
found, err = s.ReleaseByKey(id, ifname, match)
_, err = s.ReleaseByKey(id, ifname, match)
}
return err
}