From 0f12b6fe55f6b5ce70d8c388ec2df35db9feffbb Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Mon, 21 Mar 2022 14:49:47 +0100 Subject: 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 --- libpod/container_internal_linux.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'libpod/container_internal_linux.go') diff --git a/libpod/container_internal_linux.go b/libpod/container_internal_linux.go index 75250b9b1..de866f6b0 100644 --- a/libpod/container_internal_linux.go +++ b/libpod/container_internal_linux.go @@ -2587,7 +2587,7 @@ func (c *Container) generateUserGroupEntry(addedGID int) (string, int, error) { gid, err := strconv.ParseUint(group, 10, 32) if err != nil { - return "", 0, nil + return "", 0, nil // nolint: nilerr } if addedGID != 0 && addedGID == int(gid) { @@ -2740,7 +2740,8 @@ func (c *Container) generateUserPasswdEntry(addedUID int) (string, int, int, err // If a non numeric User, then don't generate passwd uid, err := strconv.ParseUint(userspec, 10, 32) if err != nil { - return "", 0, 0, nil + // FIXME: this error should probably be returned + return "", 0, 0, nil // nolint: nilerr } if addedUID != 0 && int(uid) == addedUID { -- cgit v1.2.3-54-g00ecf