Skip to content

Commit

Permalink
chore(pano.Panorama.DeviceGroup): update target copying
Browse files Browse the repository at this point in the history
  • Loading branch information
shinmog committed Sep 22, 2022
1 parent cc42e24 commit 8ea0628
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions pnrm/dg/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,7 @@ type Entry struct {
// Name field relates to the XPATH of this object, this field is not copied.
func (o *Entry) Copy(s Entry) {
o.Description = s.Description
if s.Devices == nil {
o.Devices = nil
} else {
o.Devices = make(map[string][]string)
for key, val := range s.Devices {
if val == nil {
o.Devices[key] = nil
} else {
list := make([]string, len(val))
copy(list, val)
o.Devices[key] = list
}
}
}
o.Devices = util.CopyTargets(s.Devices)
}

/** Structs / functions for normalization. **/
Expand Down

0 comments on commit 8ea0628

Please sign in to comment.