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

Function pathVar

cmd/incusd/daemon.go:890–892  ·  view source on GitHub ↗

pathVar returns the value of the named path variable from the request URL. The HTTP router (http.ServeMux) already URL-decodes path segments, so unlike the previous gorilla/mux based implementation the value must not be unescaped again. An error is returned to keep call sites uniform with the previ

(r *http.Request, name string)

Source from the content-addressed store, hash-verified

888// again. An error is returned to keep call sites uniform with the previous
889// url.PathUnescape based code.
890func pathVar(r *http.Request, name string) (string, error) {
891 return r.PathValue(name), nil
892}
893
894// have we setup shared mounts?
895var sharedMountsLock sync.Mutex

Callers 15

instanceConsolePostFunction · 0.85
instanceConsoleLogGetFunction · 0.85
instanceConsoleLogDeleteFunction · 0.85
storagePoolBucketsGetFunction · 0.85
storagePoolBucketGetFunction · 0.85
storagePoolBucketsPostFunction · 0.85
storagePoolBucketPutFunction · 0.85
storagePoolBucketDeleteFunction · 0.85
storagePoolBucketKeysGetFunction · 0.85
storagePoolBucketKeyGetFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…