From ec16a4d5546b4e38fb930ff4a41aff335fb7f1b4 Mon Sep 17 00:00:00 2001 From: Park jungtae Date: Sun, 23 Nov 2025 15:53:02 +0900 Subject: [PATCH] fix: split else-if to avoid identical-branches lint error Signed-off-by: Park jungtae --- pkg/cmd/container/create_userns_opts_linux.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/container/create_userns_opts_linux.go b/pkg/cmd/container/create_userns_opts_linux.go index 13f9275801c..1702c8c8d45 100644 --- a/pkg/cmd/container/create_userns_opts_linux.go +++ b/pkg/cmd/container/create_userns_opts_linux.go @@ -324,7 +324,8 @@ func getUserAndGroup(spec string) (user.User, user.Group, error) { parts := strings.Split(spec, ":") if len(parts) > 2 { return user.User{}, user.Group{}, fmt.Errorf("invalid identity mapping format: %s", spec) - } else if len(parts) == 2 && (parts[0] == "" || parts[1] == "") { + } + if len(parts) == 2 && (parts[0] == "" || parts[1] == "") { return user.User{}, user.Group{}, fmt.Errorf("invalid identity mapping format: %s", spec) }