From 13dd5263fd7fdd98c8cf109d17204658f5b77f32 Mon Sep 17 00:00:00 2001 From: James Rasell Date: Thu, 18 May 2023 14:49:41 +0200 Subject: [PATCH] variable: fixup metadata copy comment and remove unrequired type. (#17234) --- nomad/structs/variables.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nomad/structs/variables.go b/nomad/structs/variables.go index 9fef9d710..423df8deb 100644 --- a/nomad/structs/variables.go +++ b/nomad/structs/variables.go @@ -219,9 +219,10 @@ func (vd *VariableDecrypted) Canonicalize() { } } -// GetNamespace returns the variable's namespace. Used for pagination. +// Copy returns a fully hydrated copy of VariableMetadata that can be +// manipulated while ensuring the original is not touched. func (sv *VariableMetadata) Copy() *VariableMetadata { - var out VariableMetadata = *sv + var out = *sv return &out }