diff --git a/cli/command/formatter/reflect.go b/cli/command/formatter/reflect.go index 89da07b8a392..8487661a75a3 100644 --- a/cli/command/formatter/reflect.go +++ b/cli/command/formatter/reflect.go @@ -24,7 +24,7 @@ func MarshalJSON(x any) ([]byte, error) { // marshalMap marshals x to map[string]any func marshalMap(x any) (map[string]any, error) { val := reflect.ValueOf(x) - if val.Kind() != reflect.Ptr { + if val.Kind() != reflect.Pointer { return nil, fmt.Errorf("expected a pointer to a struct, got %v", val.Kind()) } if val.IsNil() {