From 4bccad2862feb9a55b411d173f4f1110fc4ba2ca Mon Sep 17 00:00:00 2001 From: paulip1792 Date: Mon, 7 Mar 2022 16:38:31 +0800 Subject: [PATCH] fix: wrong use of fallthrough in marshalling paramWrapperType --- lens/util/repo.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lens/util/repo.go b/lens/util/repo.go index c88664372..a3b930226 100644 --- a/lens/util/repo.go +++ b/lens/util/repo.go @@ -380,13 +380,13 @@ func (wt *paramWrapperType) MarshalJSON() ([]byte, error) { return json.Marshal(wt.obj) } - switch t.Kind() { - case reflect.Ptr: + if t.Kind() == reflect.Ptr { // unwrap pointer v = v.Elem() t = t.Elem() - fallthrough + } + switch t.Kind() { case reflect.Struct: // if its a struct, walk its fields and recurse. m := make(map[string]interface{})