MCPcopy Index your code
hub / github.com/nikivdev/go / urlsEquivalent

Function urlsEquivalent

cli/flow/main.go:5004–5011  ·  view source on GitHub ↗
(a, b string)

Source from the content-addressed store, hash-verified

5002}
5003
5004func urlsEquivalent(a, b string) bool {
5005 na := normalizeRemoteURL(a)
5006 nb := normalizeRemoteURL(b)
5007 if na != "" && nb != "" {
5008 return strings.EqualFold(na, nb)
5009 }
5010 return strings.EqualFold(strings.TrimSpace(a), strings.TrimSpace(b))
5011}
5012
5013func normalizeRemoteURL(raw string) string {
5014 trimmed := strings.TrimSpace(raw)

Callers 1

runGitMirrorSetupFunction · 0.85

Calls 1

normalizeRemoteURLFunction · 0.85

Tested by

no test coverage detected