MCPcopy Create free account
hub / github.com/1Panel-dev/1Panel / sanitizeComposeFileName

Function sanitizeComposeFileName

agent/app/service/backup_compose.go:699–707  ·  view source on GitHub ↗
(in string)

Source from the content-addressed store, hash-verified

697}
698
699func sanitizeComposeFileName(in string) string {
700 name := strings.TrimSpace(in)
701 name = strings.ReplaceAll(name, "/", "_")
702 name = strings.ReplaceAll(name, ":", "_")
703 if name == "" {
704 return "container"
705 }
706 return name
707}

Callers 1

handleComposeBackupFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected