MCPcopy Index your code
hub / github.com/coder/coder / extractHost

Function extractHost

coderd/externalauth/gitprovider/github.go:95–101  ·  view source on GitHub ↗

extractHost returns the host portion of a URL.

(rawURL string)

Source from the content-addressed store, hash-verified

93
94// extractHost returns the host portion of a URL.
95func extractHost(rawURL string) string {
96 u, err := url.Parse(rawURL)
97 if err != nil {
98 return "github.com"
99 }
100 return u.Host
101}
102
103func (g *githubProvider) ParseRepositoryOrigin(raw string) (owner string, repo string, normalizedOrigin string, ok bool) {
104 raw = strings.TrimSpace(raw)

Callers 1

newGitHubFunction · 0.85

Calls 1

ParseMethod · 0.65

Tested by

no test coverage detected