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

Function GetPartialReference

tools/reference/ref.go:119–126  ·  view source on GitHub ↗

GetPartialReference is exactly like GetReference, but allows you to set the FieldPath.

(scheme *runtime.Scheme, obj runtime.Object, fieldPath string)

Source from the content-addressed store, hash-verified

117
118// GetPartialReference is exactly like GetReference, but allows you to set the FieldPath.
119func GetPartialReference(scheme *runtime.Scheme, obj runtime.Object, fieldPath string) (*v1.ObjectReference, error) {
120 ref, err := GetReference(scheme, obj)
121 if err != nil {
122 return nil, err
123 }
124 ref.FieldPath = fieldPath
125 return ref, nil
126}

Callers

nothing calls this directly

Calls 1

GetReferenceFunction · 0.85

Tested by

no test coverage detected