MCPcopy Create free account
hub / github.com/compose-spec/compose-go / NormalizeProjectName

Function NormalizeProjectName

loader/loader.go:749–754  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

747}
748
749func NormalizeProjectName(s string) string {
750 r := regexp.MustCompile("[a-z0-9_-]")
751 s = strings.ToLower(s)
752 s = strings.Join(r.FindAllString(s, -1), "")
753 return strings.TrimLeft(s, "_-")
754}
755
756var userDefinedKeys = []tree.Path{
757 "services",

Callers 3

WithNameFunction · 0.92
withNamePrecedenceLoadFunction · 0.92
projectNameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…