*: clean up staticcheck problems (#2723)

Fix problems that can be fixed, ignore the ones that don't make sense
This commit is contained in:
Alessandro Arzilli
2021-09-28 21:07:42 +02:00
committed by GitHub
parent efc4483175
commit 29eae8f617
31 changed files with 90 additions and 154 deletions

View File

@ -9,6 +9,8 @@ import (
sys "golang.org/x/sys/unix"
)
//lint:file-ignore ST1005 errors here can be capitalized
func attachErrorMessage(pid int, err error) error {
fallbackerr := fmt.Errorf("could not attach to pid %d: %s", pid, err)
if serr, ok := err.(syscall.Errno); ok {