nomad/structs: fix noop breaks (#9348)
This commit is contained in:
parent
d38f3e6e04
commit
60936f554c
|
@ -1434,11 +1434,12 @@ func multiregionRegionDiff(r, other *MultiregionRegion, contextual bool) *Object
|
|||
sort.Sort(FieldDiffs(diff.Fields))
|
||||
|
||||
var added, deleted, edited bool
|
||||
Loop:
|
||||
for _, f := range diff.Fields {
|
||||
switch f.Type {
|
||||
case DiffTypeEdited:
|
||||
edited = true
|
||||
break
|
||||
break Loop
|
||||
case DiffTypeDeleted:
|
||||
deleted = true
|
||||
case DiffTypeAdded:
|
||||
|
@ -1990,11 +1991,12 @@ func primitiveObjectDiff(old, new interface{}, filter []string, name string, con
|
|||
diff.Fields = fieldDiffs(oldPrimitiveFlat, newPrimitiveFlat, contextual)
|
||||
|
||||
var added, deleted, edited bool
|
||||
Loop:
|
||||
for _, f := range diff.Fields {
|
||||
switch f.Type {
|
||||
case DiffTypeEdited:
|
||||
edited = true
|
||||
break
|
||||
break Loop
|
||||
case DiffTypeDeleted:
|
||||
deleted = true
|
||||
case DiffTypeAdded:
|
||||
|
|
Loading…
Reference in New Issue