linter: enable nilerr

A number of cases looked suspicious, so I marked them with `FIXME`s to
leave some breadcrumbs.

Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
Valentin Rothberg
2022-03-21 14:49:47 +01:00
parent 081e091437
commit 0f12b6fe55
21 changed files with 47 additions and 33 deletions

View File

@ -727,7 +727,7 @@ func SocketPath() (string, error) {
func LookupUser(name string) (*user.User, error) {
// Assume UID look up first, if it fails lookup by username
if u, err := user.LookupId(name); err == nil {
return u, err
return u, nil
}
return user.Lookup(name)
}