MCPcopy Create free account
hub / github.com/go-git/go-git / ApplyInsteadOf

Method ApplyInsteadOf

config/url.go:75–81  ·  view source on GitHub ↗
(url string)

Source from the content-addressed store, hash-verified

73}
74
75func (u *URL) ApplyInsteadOf(url string) string {
76 if !strings.HasPrefix(url, u.InsteadOf) {
77 return url
78 }
79
80 return u.Name + url[len(u.InsteadOf):]
81}

Callers 2

TestApplyInsteadOfMethod · 0.95
applyURLRulesMethod · 0.80

Calls

no outgoing calls

Tested by 1

TestApplyInsteadOfMethod · 0.76