MCPcopy
hub / github.com/harness/harness / GetRepoURLWithoutProtocol

Function GetRepoURLWithoutProtocol

registry/services/webhook/helper.go:157–166  ·  view source on GitHub ↗
(ctx context.Context, registryURL string)

Source from the content-addressed store, hash-verified

155}
156
157func GetRepoURLWithoutProtocol(ctx context.Context, registryURL string) string {
158 repoURL := registryURL
159 parsedURL, err := url.Parse(repoURL)
160 if err != nil {
161 log.Ctx(ctx).Error().Stack().Err(err).Msg("Error parsing URL: ")
162 return ""
163 }
164
165 return parsedURL.Host + parsedURL.Path
166}

Callers 2

Calls 4

MsgMethod · 0.80
ParseMethod · 0.65
ErrMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…