Skip to content

Commit 8c1ebac

Browse files
committed
code.ResoureCompare: return an empty string for non implemented cases (slice/map of structs)
1 parent 8825c71 commit 8c1ebac

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pkg/generate/code/compare.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ func compareNil(
220220
case "list", "blob":
221221
// for slice types, there is no nilability test. Instead, the normal
222222
// value test checks length of slices.
223+
return ""
223224
case "boolean", "string", "character", "byte", "short", "integer", "long",
224225
"float", "double", "timestamp", "structure", "map", "jsonvalue":
225226
// if ackcompare.HasNilDifference(a.ko.Spec.Name, b.ko.Spec.Name) {
@@ -365,6 +366,7 @@ func compareMap(
365366
// TODO(jaypipes): Implement this by walking the keys and struct values
366367
// and comparing each struct individually, building up the fieldPath
367368
// appropriately...
369+
return ""
368370
default:
369371
panic("Unsupported shape type in generate.code.compareMap: " + shape.Type)
370372
}

0 commit comments

Comments
 (0)