MCPcopy Create free account
hub / github.com/cloudwan/gohan / isURLRelative

Function isURLRelative

schema/url.go:24–26  ·  view source on GitHub ↗
(u *url.URL)

Source from the content-addressed store, hash-verified

22)
23
24func isURLRelative(u *url.URL) bool {
25 return (u.Scheme == "" || u.Scheme == "file") && (u.Host != "" || u.Host == "" && (u.Path == "" || u.Path[0:1] != "/"))
26}
27
28func fixRelativeURL(rawurl string, dir string) (string, error) {
29 if rawurl == "" {

Callers 2

TestIsURLRelativeFunction · 0.85
fixRelativeURLFunction · 0.85

Calls

no outgoing calls

Tested by 1

TestIsURLRelativeFunction · 0.68