Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A new version of staticcheck (included into golangci-lint 1.46.2) gives this new warning: > libcontainer/factory_linux.go:230:59: SA9008: e refers to the result of a failed type assertion and is a zero value, not the value that was being type-asserted (staticcheck) > err = fmt.Errorf("panic from initialization: %v, %s", e, debug.Stack()) > ^ > libcontainer/factory_linux.go:226:7: SA9008(related information): this is the variable being read (staticcheck) > if e, ok := e.(error); ok { > ^ Apparently, this is indeed a bug. Fix by using a different name for a new variable, so we can access the old one under "else". Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
- Loading branch information