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

Method Print

pkg/cmd/diff/diff.go:236–247  ·  view source on GitHub ↗

Print the object inside the writer w.

(obj runtime.Object, w io.Writer)

Source from the content-addressed store, hash-verified

234
235// Print the object inside the writer w.
236func (p *Printer) Print(obj runtime.Object, w io.Writer) error {
237 if obj == nil {
238 return nil
239 }
240 data, err := yaml.Marshal(obj)
241 if err != nil {
242 return err
243 }
244 _, err = w.Write(data)
245 return err
246
247}
248
249// DiffVersion gets the proper version of objects, and aggregate them into a directory.
250type DiffVersion struct {

Callers 13

TestPrinterFunction · 0.95
ValidateMethod · 0.45
resourceForMethod · 0.45
printStatusMethod · 0.45
ValidateMethod · 0.45
DeleteResultMethod · 0.45
PrintMethod · 0.45
DiffMethod · 0.45
RunMethod · 0.45
waitForContainerMethod · 0.45
keyToEnvNameMethod · 0.45

Calls 1

WriteMethod · 0.65

Tested by 1

TestPrinterFunction · 0.76