(hostname string)
| 78 | } |
| 79 | |
| 80 | func GistHost(hostname string) string { |
| 81 | if isGarage(hostname) { |
| 82 | return fmt.Sprintf("%s/gist/", hostname) |
| 83 | } |
| 84 | if ghauth.IsEnterprise(hostname) { |
| 85 | return fmt.Sprintf("%s/gist/", hostname) |
| 86 | } |
| 87 | if strings.EqualFold(hostname, localhost) { |
| 88 | return fmt.Sprintf("%s/gist/", hostname) |
| 89 | } |
| 90 | return fmt.Sprintf("gist.%s/", hostname) |
| 91 | } |
| 92 | |
| 93 | func HostPrefix(hostname string) string { |
| 94 | if strings.EqualFold(hostname, localhost) { |
no test coverage detected