MCPcopy Create free account
hub / github.com/MiniCodeMonkey/chief / isValidPRDName

Function isValidPRDName

internal/cmd/new.go:103–113  ·  view source on GitHub ↗

isValidPRDName checks if the name contains only valid characters.

(name string)

Source from the content-addressed store, hash-verified

101
102// isValidPRDName checks if the name contains only valid characters.
103func isValidPRDName(name string) bool {
104 if name == "" {
105 return false
106 }
107 for _, c := range name {
108 if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_') {
109 return false
110 }
111 }
112 return true
113}

Callers 3

RunNewFunction · 0.70
TestIsValidPRDNameFunction · 0.70
RunEditFunction · 0.70

Calls

no outgoing calls

Tested by 1

TestIsValidPRDNameFunction · 0.56