MCPcopy Index your code
hub / github.com/SpectoLabs/hoverfly / BuildURL

Function BuildURL

hoverctl/wrapper/hoverfly.go:134–139  ·  view source on GitHub ↗
(target configuration.Target, endpoint string)

Source from the content-addressed store, hash-verified

132}
133
134func BuildURL(target configuration.Target, endpoint string) string {
135 if !strings.HasPrefix(target.Host, "http://") && !strings.HasPrefix(target.Host, "https://") {
136 return fmt.Sprintf("http://%v:%v%v", target.Host, target.AdminPort, endpoint)
137 }
138 return fmt.Sprintf("%v:%v%v", target.Host, target.AdminPort, endpoint)
139}
140
141func IsLocal(url string) bool {
142 return strings.Contains(url, "localhost") || strings.Contains(url, "127.0.0.1")

Calls

no outgoing calls