mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-11 17:12:51 +00:00
code review
This commit is contained in:
@@ -18,11 +18,11 @@ type Patch struct {
|
|||||||
Target *Selector `json:"target,omitempty" yaml:"target,omitempty"`
|
Target *Selector `json:"target,omitempty" yaml:"target,omitempty"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// Equals return true if p equals another.
|
// Equals return true if p equals o.
|
||||||
func (p *Patch) Equals(another Patch) bool {
|
func (p *Patch) Equals(o Patch) bool {
|
||||||
targetEqual := (p.Target == another.Target) ||
|
targetEqual := (p.Target == o.Target) ||
|
||||||
(p.Target != nil && another.Target != nil && *p.Target == *another.Target)
|
(p.Target != nil && o.Target != nil && *p.Target == *o.Target)
|
||||||
return p.Path == another.Path &&
|
return p.Path == o.Path &&
|
||||||
p.Patch == another.Patch &&
|
p.Patch == o.Patch &&
|
||||||
targetEqual
|
targetEqual
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user