MCPcopy
hub / github.com/lxc/incus / urlJoinPathAbsolute

Function urlJoinPathAbsolute

client/simplestreams_images.go:378–393  ·  view source on GitHub ↗
(baseHost string, path string)

Source from the content-addressed store, hash-verified

376}
377
378func urlJoinPathAbsolute(baseHost string, path string) (result string, err error) {
379 if strings.HasPrefix("/", path) {
380 // absolute path
381 baseHostURL, err := url.ParseRequestURI(baseHost)
382 if err != nil {
383 return "", err
384 }
385
386 baseHostURL.Path = path
387
388 return baseHostURL.String(), nil
389 }
390
391 // relative path
392 return url.JoinPath(baseHost, path)
393}

Callers 1

GetImageFileMethod · 0.85

Calls 1

StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…