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