Merge pull request #3515 from kolyshkin/linter

Bump golangci-lint, fix an error path
This commit is contained in:
Mrunal Patel
2022-06-29 14:38:02 -07:00
committed by GitHub
2 changed files with 3 additions and 4 deletions
+1 -1
View File
@@ -32,7 +32,7 @@ jobs:
sudo apt -q install libseccomp-dev
- uses: golangci/golangci-lint-action@v3
with:
version: v1.45
version: v1.46
# Extra linters, only checking new code from a pull request.
- name: lint-extra
if: github.event_name == 'pull_request'
+2 -3
View File
@@ -223,10 +223,9 @@ func StartInitialization() (err error) {
defer func() {
if e := recover(); e != nil {
if e, ok := e.(error); ok {
err = fmt.Errorf("panic from initialization: %w, %s", e, debug.Stack())
if ee, ok := e.(error); ok {
err = fmt.Errorf("panic from initialization: %w, %s", ee, debug.Stack())
} else {
//nolint:errorlint // here e is not of error type
err = fmt.Errorf("panic from initialization: %v, %s", e, debug.Stack())
}
}