mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-11 06:03:57 +08:00
Merge pull request #3515 from kolyshkin/linter
Bump golangci-lint, fix an error path
This commit is contained in:
@@ -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'
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user