Skip to content

Commit a9b5a89

Browse files
committed
issue 2117: fix another lint
Signed-off-by: Linh Luong <[email protected]>
1 parent f48b714 commit a9b5a89

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/osutil/user.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,10 @@ var (
3535
// regexUsername matches user and group names to be valid for `useradd`.
3636
// `useradd` allows names with a trailing '$', but it feels prudent to map those
3737
// names to the fallback user as well, so the regex does not allow them.
38-
var regexUsername = regexp.MustCompile("^[a-z_][a-z0-9_-]*$")
39-
var notAllowedUsernameRegex = regexp.MustCompile(`^admin$`)
38+
var (
39+
regexUsername = regexp.MustCompile("^[a-z_][a-z0-9_-]*$")
40+
notAllowedUsernameRegex = regexp.MustCompile(`^admin$`)
41+
)
4042

4143
// regexPath detects valid Linux path.
4244
var regexPath = regexp.MustCompile("^[/a-zA-Z0-9_-]+$")

0 commit comments

Comments
 (0)