nomad/structs: fix noop breaks (#9348)

This commit is contained in:
Lars Lehtonen 2020-11-13 05:28:11 -08:00 committed by GitHub
parent d38f3e6e04
commit 60936f554c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -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: