From fd1c71dc8d40dfa2b974f3d83f79fad9069efda5 Mon Sep 17 00:00:00 2001 From: Michael Schurter Date: Thu, 23 Dec 2021 12:27:39 -0800 Subject: [PATCH] core: match struct field order in Copy() --- nomad/structs/structs.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nomad/structs/structs.go b/nomad/structs/structs.go index b856b9ddb6c..e82eba443f8 100644 --- a/nomad/structs/structs.go +++ b/nomad/structs/structs.go @@ -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 }