UserAssetUploadPrefix returns the URL prefix for user asset uploads. GHES does not support this endpoint.
(hostname string)
| 93 | // UserAssetUploadPrefix returns the URL prefix for user asset uploads. |
| 94 | // GHES does not support this endpoint. |
| 95 | func UserAssetUploadPrefix(hostname string) string { |
| 96 | if strings.EqualFold(hostname, localhost) { |
| 97 | return fmt.Sprintf("http://uploads.%s/", hostname) |
| 98 | } |
| 99 | return fmt.Sprintf("https://uploads.%s/", hostname) |
| 100 | } |
| 101 | |
| 102 | func HostPrefix(hostname string) string { |
| 103 | if strings.EqualFold(hostname, localhost) { |
no outgoing calls