Skip to content

Commit eeb0cb9

Browse files
authored
Merge pull request #34 from BaizeAI/fix/golangci-lint-ver
golangci-lint ver and timeout
2 parents cfe0c82 + f12911d commit eeb0cb9

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

.github/workflows/ci-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ jobs:
2121
uses: golangci/golangci-lint-action@v6
2222
with:
2323
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
24-
version: v1.57.2
24+
version: v1.64.8
25+
args: --timeout 10m
2526
go-unit-test:
2627
runs-on: ubuntu-latest
2728
needs: [style-check]

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ linters:
1414
disable-all: true
1515
enable:
1616
- errcheck
17-
- exportloopref
1817
- gocritic
1918
- gofumpt
2019
- goimports

internal/webhooks/pod.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7-
"k8s.io/utils/pointer"
87
"sort"
98
"strconv"
109

@@ -35,7 +34,7 @@ type imageConfig struct {
3534
func (p *PodImageWebhookAdmission) SetupWebhookWithManager(mgr manager.Manager) error {
3635
mgr.GetWebhookServer().Register("/mutate-v1-pod", &webhook.Admission{
3736
Handler: p,
38-
RecoverPanic: pointer.Bool(true),
37+
RecoverPanic: lo.ToPtr(true),
3938
})
4039
return ctrl.NewWebhookManagedBy(mgr).For(&corev1.Pod{}).Complete()
4140
}

0 commit comments

Comments
 (0)