Skip to content

Commit fac6626

Browse files
fix(lint): use reflect.Pointer (not deprecated reflect.Ptr) in ignored_fields walk
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 87ee796 commit fac6626

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

internal/handlers/provision_helper.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,7 +1052,7 @@ func stashIgnoredFields(c *fiber.Ctx, raw []byte, v any) {
10521052
func knownJSONFields(v any) map[string]bool {
10531053
known := map[string]bool{}
10541054
rv := reflect.ValueOf(v)
1055-
for rv.Kind() == reflect.Ptr {
1055+
for rv.Kind() == reflect.Pointer {
10561056
if rv.IsNil() {
10571057
rt := rv.Type().Elem()
10581058
collectJSONFields(rt, known)
@@ -1072,7 +1072,7 @@ func knownJSONFields(v any) map[string]bool {
10721072
// so their promoted fields are recorded too — matching encoding/json's
10731073
// unmarshal behaviour.
10741074
func collectJSONFields(rt reflect.Type, known map[string]bool) {
1075-
for rt.Kind() == reflect.Ptr {
1075+
for rt.Kind() == reflect.Pointer {
10761076
rt = rt.Elem()
10771077
}
10781078
if rt.Kind() != reflect.Struct {
@@ -1093,7 +1093,7 @@ func collectJSONFields(rt reflect.Type, known map[string]bool) {
10931093
// unexported struct type entirely).
10941094
if f.Anonymous && tagName == "" {
10951095
ft := f.Type
1096-
for ft.Kind() == reflect.Ptr {
1096+
for ft.Kind() == reflect.Pointer {
10971097
ft = ft.Elem()
10981098
}
10991099
if ft.Kind() == reflect.Struct {

0 commit comments

Comments
 (0)