MCPcopy Create free account
hub / github.com/openclaw/gogcli / normalizeAdminUserHashFunction

Function normalizeAdminUserHashFunction

internal/cmd/admin_common.go:77–90  ·  view source on GitHub ↗
(value string)

Source from the content-addressed store, hash-verified

75}
76
77func normalizeAdminUserHashFunction(value string) (string, error) {
78 switch strings.ToLower(strings.TrimSpace(value)) {
79 case "":
80 return "", nil
81 case "md5":
82 return "MD5", nil
83 case "sha-1", "sha1":
84 return "SHA-1", nil
85 case "crypt":
86 return "crypt", nil
87 default:
88 return "", usage("invalid --hash-function (expected MD5, SHA-1, crypt)")
89 }
90}
91
92func requireAdminAccount(flags *RootFlags) (string, error) {
93 account, err := requireAccount(flags)

Callers 1

newAdminUserCreatePlanFunction · 0.85

Calls 1

usageFunction · 0.85

Tested by

no test coverage detected