formatRemotePath builds a "host:path" string, wrapping IPv6 addresses in brackets.
(host, path string)
| 52 | |
| 53 | // formatRemotePath builds a "host:path" string, wrapping IPv6 addresses in brackets. |
| 54 | func formatRemotePath(host, path string) string { |
| 55 | if strings.Contains(host, ":") { |
| 56 | return "[" + host + "]:" + path |
| 57 | } |
| 58 | return host + ":" + path |
| 59 | } |
| 60 | |
| 61 | // TryCopy attempts to copy files to/from the target server, first using cached |
| 62 | // credentials and then by trying all credential combinations. |
no outgoing calls