MCPcopy
hub / github.com/cli/cli / GistHost

Function GistHost

internal/ghinstance/host.go:80–91  ·  view source on GitHub ↗
(hostname string)

Source from the content-addressed store, hash-verified

78}
79
80func 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
93func HostPrefix(hostname string) string {
94 if strings.EqualFold(hostname, localhost) {

Callers 3

ConfigureOursMethod · 0.92
ConfigureOursMethod · 0.92
GistPrefixFunction · 0.85

Calls 1

isGarageFunction · 0.85

Tested by

no test coverage detected