We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f48b714 commit a9b5a89Copy full SHA for a9b5a89
pkg/osutil/user.go
@@ -35,8 +35,10 @@ var (
35
// regexUsername matches user and group names to be valid for `useradd`.
36
// `useradd` allows names with a trailing '$', but it feels prudent to map those
37
// 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$`)
+var (
+ regexUsername = regexp.MustCompile("^[a-z_][a-z0-9_-]*$")
40
+ notAllowedUsernameRegex = regexp.MustCompile(`^admin$`)
41
+)
42
43
// regexPath detects valid Linux path.
44
var regexPath = regexp.MustCompile("^[/a-zA-Z0-9_-]+$")
0 commit comments