MCPcopy Create free account
hub / github.com/containers/image / resolvePaths

Function resolvePaths

openshift/openshift-copies.go:700–711  ·  view source on GitHub ↗

resolvePaths is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules.resolvePaths. ResolvePaths updates the given refs to be absolute paths, relative to the given base directory

(refs []*string, base string)

Source from the content-addressed store, hash-verified

698// resolvePaths is a modified copy of k8s.io/kubernetes/pkg/client/unversioned/clientcmd.ClientConfigLoadingRules.resolvePaths.
699// ResolvePaths updates the given refs to be absolute paths, relative to the given base directory
700func resolvePaths(refs []*string, base string) error {
701 for _, ref := range refs {
702 // Don't resolve empty paths
703 if len(*ref) > 0 {
704 // Don't resolve absolute paths
705 if !filepath.IsAbs(*ref) {
706 *ref = filepath.Join(base, *ref)
707 }
708 }
709 }
710 return nil
711}
712
713// restClientFor is a modified copy of k8s.io/kubernetes/pkg/client/restclient.RESTClientFor.
714// RESTClientFor returns a RESTClient that satisfies the requested attributes on a client Config

Callers 1

resolveLocalPathsFunction · 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…