Fix tests and linters

This commit is contained in:
Daniel
2022-02-02 12:48:42 +01:00
parent f2fcad4d11
commit 60d8664e7b
171 changed files with 944 additions and 874 deletions

View File

@@ -1,4 +1,4 @@
// +build linux
// go:build linux
package proc
@@ -7,9 +7,8 @@ import (
"os"
"time"
"github.com/safing/portmaster/network/socket"
"github.com/safing/portbase/log"
"github.com/safing/portmaster/network/socket"
)
var (
@@ -128,7 +127,10 @@ func readDirNames(dir string) (names []string) {
}
return
}
defer file.Close()
defer func() {
_ = file.Close()
}()
names, err = file.Readdirnames(0)
if err != nil {
log.Warningf("proc: could not get entries from directory %s: %s", dir, err)