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

Function adminUserRandChar

internal/cmd/admin_common.go:55–64  ·  view source on GitHub ↗
(set string)

Source from the content-addressed store, hash-verified

53}
54
55func adminUserRandChar(set string) (byte, error) {
56 if len(set) == 0 {
57 return 0, fmt.Errorf("empty character set")
58 }
59 idx, err := adminUserRandInt(len(set))
60 if err != nil {
61 return 0, err
62 }
63 return set[idx], nil
64}
65
66func adminUserRandInt(maxVal int) (int, error) {
67 if maxVal <= 0 {

Callers 1

Calls 2

adminUserRandIntFunction · 0.85
ErrorfMethod · 0.80

Tested by

no test coverage detected