MCPcopy
hub / github.com/kubernetes/kubectl / getObject

Method getObject

pkg/cmd/diff/diff.go:267–275  ·  view source on GitHub ↗
(obj Object)

Source from the content-addressed store, hash-verified

265}
266
267func (v *DiffVersion) getObject(obj Object) (runtime.Object, error) {
268 switch v.Name {
269 case "LIVE":
270 return obj.Live(), nil
271 case "MERGED":
272 return obj.Merged()
273 }
274 return nil, fmt.Errorf("Unknown version: %v", v.Name)
275}
276
277// Print prints the object using the printer into a new file in the directory.
278func (v *DiffVersion) Print(name string, obj runtime.Object, printer Printer) error {

Callers 1

DiffMethod · 0.80

Calls 2

LiveMethod · 0.65
MergedMethod · 0.65

Tested by

no test coverage detected