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

Function NewDiffer

pkg/cmd/diff/diff.go:551–565  ·  view source on GitHub ↗
(from, to string)

Source from the content-addressed store, hash-verified

549}
550
551func NewDiffer(from, to string) (*Differ, error) {
552 differ := Differ{}
553 var err error
554 differ.From, err = NewDiffVersion(from)
555 if err != nil {
556 return nil, err
557 }
558 differ.To, err = NewDiffVersion(to)
559 if err != nil {
560 differ.From.Dir.Delete()
561 return nil, err
562 }
563
564 return &differ, nil
565}
566
567// Diff diffs to versions of a specific object, and print both versions to directories.
568func (d *Differ) Diff(obj Object, printer Printer, showManagedFields, showSecrets bool) error {

Callers 4

RunMethod · 0.85
TestDifferFunction · 0.85
TestShowManagedFieldsFunction · 0.85
TestShowSecretsFunction · 0.85

Calls 2

NewDiffVersionFunction · 0.85
DeleteMethod · 0.65

Tested by 3

TestDifferFunction · 0.68
TestShowManagedFieldsFunction · 0.68
TestShowSecretsFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…