MCPcopy Index your code
hub / github.com/1Panel-dev/KubePi / parseResourceName

Function parseResourceName

internal/api/v1/proxy/proxy.go:470–476  ·  view source on GitHub ↗
(path string)

Source from the content-addressed store, hash-verified

468}
469
470func parseResourceName(path string) (string, error) {
471 ss := strings.Split(path, "/")
472 if len(ss) > 0 {
473 return ss[len(ss)-1], nil
474 }
475 return "", fmt.Errorf("cant not get resource name from url %s", path)
476}
477
478func addUrlNamespace(path string, ns string) string {
479 ss := strings.Split(path, "/")

Callers 1

KubernetesAPIProxyMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected