Skip to content

Commit

Permalink
core: match struct field order in Copy()
Browse files Browse the repository at this point in the history
  • Loading branch information
schmichael committed Dec 23, 2021
1 parent 631db25 commit fd1c71d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions nomad/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -2025,20 +2025,20 @@ func (n *Node) Copy() *Node {
nn := new(Node)
*nn = *n
nn.Attributes = helper.CopyMapStringString(nn.Attributes)
nn.Resources = nn.Resources.Copy()
nn.Reserved = nn.Reserved.Copy()
nn.NodeResources = nn.NodeResources.Copy()
nn.ReservedResources = nn.ReservedResources.Copy()
nn.Resources = nn.Resources.Copy()
nn.Reserved = nn.Reserved.Copy()
nn.Links = helper.CopyMapStringString(nn.Links)
nn.Meta = helper.CopyMapStringString(nn.Meta)
nn.Events = copyNodeEvents(n.Events)
nn.DrainStrategy = nn.DrainStrategy.Copy()
nn.LastDrain = nn.LastDrain.Copy()
nn.Events = copyNodeEvents(n.Events)
nn.Drivers = copyNodeDrivers(n.Drivers)
nn.CSIControllerPlugins = copyNodeCSI(nn.CSIControllerPlugins)
nn.CSINodePlugins = copyNodeCSI(nn.CSINodePlugins)
nn.Drivers = copyNodeDrivers(n.Drivers)
nn.HostVolumes = copyNodeHostVolumes(n.HostVolumes)
nn.HostNetworks = copyNodeHostNetworks(n.HostNetworks)
nn.LastDrain = nn.LastDrain.Copy()
return nn
}

Expand Down

0 comments on commit fd1c71d

Please sign in to comment.