mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-22 05:46:30 +03:00
@@ -14,6 +14,12 @@ import (
|
||||
|
||||
func chuser(input string) error {
|
||||
givenUser, givenGroup, _ := strings.Cut(input, ":")
|
||||
if givenUser == "" {
|
||||
return fmt.Errorf("user is empty")
|
||||
}
|
||||
if strings.Index(input, ":") > -1 && givenGroup == "" {
|
||||
return fmt.Errorf("group is empty")
|
||||
}
|
||||
|
||||
var (
|
||||
err error
|
||||
|
||||
Reference in New Issue
Block a user