ShellQuote wraps s in single quotes with proper escaping.
(s string)
| 191 | |
| 192 | // ShellQuote wraps s in single quotes with proper escaping. |
| 193 | func ShellQuote(s string) string { |
| 194 | return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'" |
| 195 | } |
| 196 | |
| 197 | func escapeAppleScriptString(s string) string { |
| 198 | s = strings.ReplaceAll(s, `\`, `\\`) |
no outgoing calls