bump golangci-lint to 2.12.2 (#5727)
This commit is contained in:
@@ -23,7 +23,7 @@ jobs:
|
||||
|
||||
- uses: golangci/golangci-lint-action@v9
|
||||
with:
|
||||
version: v2.11.4
|
||||
version: v2.12.2
|
||||
|
||||
go_mod:
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
BASE_IMAGE = golang:1.26-alpine3.23
|
||||
GOLANGCI_LINT_IMAGE = golangci/golangci-lint:v2.11.4
|
||||
GOLANGCI_LINT_IMAGE = golangci/golangci-lint:v2.12.2
|
||||
NODE_IMAGE = node:20-alpine3.23
|
||||
|
||||
.PHONY: $(shell ls)
|
||||
|
||||
@@ -28,7 +28,7 @@ func isJSONNull(raw json.RawMessage) bool {
|
||||
}
|
||||
|
||||
func needsCustomDecode(t reflect.Type) bool {
|
||||
for t.Kind() == reflect.Ptr {
|
||||
for t.Kind() == reflect.Pointer {
|
||||
t = t.Elem()
|
||||
}
|
||||
return t.Kind() == reflect.Struct || t.Kind() == reflect.Slice
|
||||
@@ -47,7 +47,7 @@ func checkForUnknownFields(rawMap map[string]json.RawMessage, known map[string]i
|
||||
}
|
||||
|
||||
func decode(v reflect.Value, raw json.RawMessage, path string) error {
|
||||
for v.Kind() == reflect.Ptr {
|
||||
for v.Kind() == reflect.Pointer {
|
||||
if isJSONNull(raw) {
|
||||
v.Set(reflect.Zero(v.Type()))
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user