Update golangci-lint to 1.52.2 (#3253)

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-04-27 16:49:09 -07:00 committed by GitHub
parent 6ac8c9f331
commit f2f547f60a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -416,7 +416,7 @@ jobs:
with:
# Keep pinned to a verson as sometimes updates will add new lint
# failures in unchanged code.
version: v1.50.1
version: v1.52.2
working-directory: src
skip-pkg-cache: true
skip-build-cache: true

View File

@ -1,5 +1,5 @@
# This must match the version defined in .github/workflows/lint.yaml.
WANTED_LINT_VERSION := 1.50.1
WANTED_LINT_VERSION := 1.52.2
LINT_VERSION := $(shell golangci-lint version | cut -d' ' -f4)
HAS_LINT := $(shell which golangci-lint)

View File

@ -45,12 +45,12 @@ func Recovery(ctx context.Context, r any, namespace string) error {
for i := 1; i < 10; i++ {
_, file, line, ok := runtime.Caller(i)
if j > 0 {
if strings.Contains(file, "panic.go") {
j = 0
} else {
if !strings.Contains(file, "panic.go") {
inFile = fmt.Sprintf(": file %s - line %d", file, line)
break
}
j = 0
}
// skip the location where Recovery() gets called.