MCPcopy Index your code
hub / github.com/devspace-sh/devspace / ConvertCommands

Function ConvertCommands

pkg/util/encoding/encoding.go:38–43  ·  view source on GitHub ↗
(ID string)

Source from the content-addressed store, hash-verified

36}
37
38func ConvertCommands(ID string) string {
39 ID = strings.ToLower(ID)
40 ID = convertRegEx1.ReplaceAllString(ID, "-")
41 ID = convertRegEx3.ReplaceAllString(ID, "")
42 return SafeConcatName(ID)
43}
44
45var UnsafeCommandNameRegEx = regexp.MustCompile(`^(([a-z0-9][a-z0-9\-_]*[a-z0-9])|([a-z0-9]))$`)
46var UnsafeNameRegEx = regexp.MustCompile(`^(([a-z0-9][a-z0-9\-]*[a-z0-9])|([a-z0-9]))$`)

Callers 1

UpgradeMethod · 0.92

Calls 1

SafeConcatNameFunction · 0.85

Tested by

no test coverage detected