MCPcopy
hub / github.com/kubernetes/client-go / defaultResourcePathWithPrefix

Function defaultResourcePathWithPrefix

rest/request_test.go:1972–1991  ·  view source on GitHub ↗
(prefix, resource, namespace, name string)

Source from the content-addressed store, hash-verified

1970}
1971
1972func defaultResourcePathWithPrefix(prefix, resource, namespace, name string) string {
1973 var path string
1974 path = "/api/" + v1.SchemeGroupVersion.Version
1975
1976 if prefix != "" {
1977 path = path + "/" + prefix
1978 }
1979 if namespace != "" {
1980 path = path + "/namespaces/" + namespace
1981 }
1982 // Resource names are lower case.
1983 resource = strings.ToLower(resource)
1984 if resource != "" {
1985 path = path + "/" + resource
1986 }
1987 if name != "" {
1988 path = path + "/" + name
1989 }
1990 return path
1991}

Callers 6

TestDoRequestNewWayFunction · 0.85
TestDoRequestNewWayObjFunction · 0.85
TestDoRequestNewWayFileFunction · 0.85
TestWasCreatedFunction · 0.85
testRESTClientFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected