diff --git a/internal/logging/hypercore.go b/internal/logging/hypercore.go index fac1689..967f154 100644 --- a/internal/logging/hypercore.go +++ b/internal/logging/hypercore.go @@ -371,18 +371,17 @@ func cloneLogMap(in map[string]interface{}) map[string]interface{} { return out } +// @goal: CHORUS-REQ-001 - Fix duplicate type case compilation error +// WHY: Go 1.18+ treats interface{} and any as identical types, causing duplicate case errors func cloneLogValue(v interface{}) interface{} { switch tv := v.(type) { - case map[string]interface{}: - return cloneLogMap(tv) case map[string]any: + // @goal: CHORUS-REQ-001 - Convert any to interface{} for cloneLogMap compatibility converted := make(map[string]interface{}, len(tv)) for k, val := range tv { - converted[k] = cloneLogValue(val) + converted[k] = val } - return converted - case []interface{}: - return cloneLogSlice(tv) + return cloneLogMap(converted) case []any: converted := make([]interface{}, len(tv)) for i, val := range tv {