MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / normalizePlanTypeForFilename

Function normalizePlanTypeForFilename

internal/auth/codex/filename.go:29–46  ·  view source on GitHub ↗
(planType string)

Source from the content-addressed store, hash-verified

27}
28
29func normalizePlanTypeForFilename(planType string) string {
30 planType = strings.TrimSpace(planType)
31 if planType == "" {
32 return ""
33 }
34
35 parts := strings.FieldsFunc(planType, func(r rune) bool {
36 return !unicode.IsLetter(r) && !unicode.IsDigit(r)
37 })
38 if len(parts) == 0 {
39 return ""
40 }
41
42 for i, part := range parts {
43 parts[i] = strings.ToLower(strings.TrimSpace(part))
44 }
45 return strings.Join(parts, "-")
46}

Callers 1

CredentialFileNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected