ShellQuote wraps s in single quotes with proper escaping.
(s string)
| 78 | |
| 79 | // ShellQuote wraps s in single quotes with proper escaping. |
| 80 | func ShellQuote(s string) string { |
| 81 | return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'" |
| 82 | } |
| 83 | |
| 84 | func escapeAppleScriptString(s string) string { |
| 85 | s = strings.ReplaceAll(s, `\`, `\\`) |
no outgoing calls