diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 5a213409e..8846215db 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -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' diff --git a/libcontainer/factory_linux.go b/libcontainer/factory_linux.go index 17b05a552..cd39ca38f 100644 --- a/libcontainer/factory_linux.go +++ b/libcontainer/factory_linux.go @@ -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()) } }