Merge pull request #61442 from anfernee/simple-fixes

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix comments and small fixes

**What this PR does / why we need it**: Fix some comments, and remove trivial duplicates. 

**Release note**:
```release-note
None
```
This commit is contained in:
Kubernetes Submit Queue 2018-03-26 06:35:41 -07:00 committed by GitHub
commit c64494a0cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ type Element interface {
GetRecorded() interface{} GetRecorded() interface{}
// HasLocal returns true if the field was explicitly // HasLocal returns true if the field was explicitly
// present in the recorded source. This is to differentiate between // present in the local source. This is to differentiate between
// undefined and set to null // undefined and set to null
HasLocal() bool HasLocal() bool
@ -88,7 +88,7 @@ type FieldMetaImpl struct {
// Type is the openapi type of the field - "list", "primitive", "map" // Type is the openapi type of the field - "list", "primitive", "map"
Type string Type string
// Name contains of the field // Name contains name of the field
Name string Name string
} }
@ -276,8 +276,7 @@ func (s *CombinedMapSlice) UpsertRecorded(key MergeKeys, l interface{}) error {
if err != nil { if err != nil {
return err return err
} }
item.recorded = l item.SetRecorded(l)
item.recordedSet = true
return nil return nil
} }
@ -289,8 +288,7 @@ func (s *CombinedMapSlice) UpsertLocal(key MergeKeys, l interface{}) error {
if err != nil { if err != nil {
return err return err
} }
item.local = l item.SetLocal(l)
item.localSet = true
return nil return nil
} }
@ -302,8 +300,7 @@ func (s *CombinedMapSlice) UpsertRemote(key MergeKeys, l interface{}) error {
if err != nil { if err != nil {
return err return err
} }
item.remote = l item.SetRemote(l)
item.remoteSet = true
return nil return nil
} }
@ -359,13 +356,13 @@ func (b *RawElementData) SetRecorded(value interface{}) {
b.recordedSet = true b.recordedSet = true
} }
// SetLocal sets the recorded value // SetLocal sets the local value
func (b *RawElementData) SetLocal(value interface{}) { func (b *RawElementData) SetLocal(value interface{}) {
b.local = value b.local = value
b.localSet = true b.localSet = true
} }
// SetRemote sets the recorded value // SetRemote sets the remote value
func (b *RawElementData) SetRemote(value interface{}) { func (b *RawElementData) SetRemote(value interface{}) {
b.remote = value b.remote = value
b.remoteSet = true b.remoteSet = true