This commit is contained in:
Neil Alexander
2024-12-13 23:12:36 +00:00
parent 657f7e0db3
commit 04be129878
3 changed files with 4 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ func chuser(input string) error {
if givenUser == "" {
return fmt.Errorf("user is empty")
}
if strings.Index(input, ":") > -1 && givenGroup == "" {
if strings.Contains(input, ":") && givenGroup == "" {
return fmt.Errorf("group is empty")
}