shellQuote returns s wrapped in POSIX single quotes so it can be passed as one shell word. Embedded single quotes are escaped using the close-quote/backslash-quote/open-quote idiom.
(s string)
| 543 | // one shell word. Embedded single quotes are escaped using the |
| 544 | // close-quote/backslash-quote/open-quote idiom. |
| 545 | func shellQuote(s string) string { |
| 546 | return "'" + strings.ReplaceAll(s, "'", `'\''`) + "'" |
| 547 | } |
| 548 | |
| 549 | // Scp uploads sourceFile to remote machine like native scp console app. |
| 550 | func (ssh_conf *MakeConfig) Scp(sourceFile string, etargetFile string) error { |
no outgoing calls