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

Function shouldUseSingleQuotes

agent/utils/env/env.go:127–129  ·  view source on GitHub ↗
(s string)

Source from the content-addressed store, hash-verified

125}
126
127func shouldUseSingleQuotes(s string) bool {
128 return hasEvenDoubleQuotes(s) && !strings.Contains(s, `\`) && !strings.Contains(s, `'`)
129}
130
131func escapeDoubleQuotedEnvValue(s string) string {
132 replacer := strings.NewReplacer(

Callers 2

MarshalFunction · 0.85
formatEnvLineFunction · 0.85

Calls 1

hasEvenDoubleQuotesFunction · 0.85

Tested by

no test coverage detected