Skip to content

Commit

Permalink
Merge pull request opencontainers#3515 from kolyshkin/linter
Browse files Browse the repository at this point in the history
Bump golangci-lint, fix an error path
  • Loading branch information
Mrunal Patel committed Jun 29, 2022
2 parents 641d5c1 + 7481c3c commit eca233d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
5 changes: 2 additions & 3 deletions libcontainer/factory_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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())
}
}
Expand Down

0 comments on commit eca233d

Please sign in to comment.