From a26899f5ab3016f54a2935c5c4ad2e176fbf6816 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Sun, 16 Aug 2026 16:23:26 +0200 Subject: [PATCH] Fix use of reflect.Ptr Apparently Ptr is a deprecated name; with the new golangci-lint version this would cause inline: Constant reflect.Ptr should be inlined --- pkg/jsonschema/generate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/jsonschema/generate.go b/pkg/jsonschema/generate.go index dc5045025..cf7596761 100644 --- a/pkg/jsonschema/generate.go +++ b/pkg/jsonschema/generate.go @@ -144,7 +144,7 @@ func setDefaultVals(rootSchema, schema *jsonschema.Schema, defaults any) { t := reflect.TypeOf(defaults) v := reflect.ValueOf(defaults) - if t.Kind() == reflect.Ptr || t.Kind() == reflect.Interface { + if t.Kind() == reflect.Pointer || t.Kind() == reflect.Interface { t = t.Elem() v = v.Elem() } @@ -202,7 +202,7 @@ func isZeroValue(v any) bool { switch rv.Kind() { case reflect.Slice, reflect.Map: return rv.Len() == 0 - case reflect.Ptr, reflect.Interface: + case reflect.Pointer, reflect.Interface: return rv.IsNil() case reflect.Struct: for i := range rv.NumField() {