bump golangci-lint to 2.12.2 (#5727)

This commit is contained in:
bluenviron-bot
2026-05-10 17:54:18 +02:00
committed by GitHub
parent 41faddfea7
commit b83d5ac4b3
3 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -23,7 +23,7 @@ jobs:
- uses: golangci/golangci-lint-action@v9 - uses: golangci/golangci-lint-action@v9
with: with:
version: v2.11.4 version: v2.12.2
go_mod: go_mod:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
+1 -1
View File
@@ -1,5 +1,5 @@
BASE_IMAGE = golang:1.26-alpine3.23 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 NODE_IMAGE = node:20-alpine3.23
.PHONY: $(shell ls) .PHONY: $(shell ls)
+2 -2
View File
@@ -28,7 +28,7 @@ func isJSONNull(raw json.RawMessage) bool {
} }
func needsCustomDecode(t reflect.Type) bool { func needsCustomDecode(t reflect.Type) bool {
for t.Kind() == reflect.Ptr { for t.Kind() == reflect.Pointer {
t = t.Elem() t = t.Elem()
} }
return t.Kind() == reflect.Struct || t.Kind() == reflect.Slice 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 { func decode(v reflect.Value, raw json.RawMessage, path string) error {
for v.Kind() == reflect.Ptr { for v.Kind() == reflect.Pointer {
if isJSONNull(raw) { if isJSONNull(raw) {
v.Set(reflect.Zero(v.Type())) v.Set(reflect.Zero(v.Type()))
return nil return nil