(hostname string, gistID string, protocol string)
| 94 | } |
| 95 | |
| 96 | func formatRemoteURL(hostname string, gistID string, protocol string) string { |
| 97 | if ghauth.IsEnterprise(hostname) { |
| 98 | if protocol == "ssh" { |
| 99 | return fmt.Sprintf("git@%s:gist/%s.git", hostname, gistID) |
| 100 | } |
| 101 | return fmt.Sprintf("https://%s/gist/%s.git", hostname, gistID) |
| 102 | } |
| 103 | |
| 104 | if protocol == "ssh" { |
| 105 | return fmt.Sprintf("git@gist.%s:%s.git", hostname, gistID) |
| 106 | } |
| 107 | return fmt.Sprintf("https://gist.%s/%s.git", hostname, gistID) |
| 108 | } |
no outgoing calls