.golangci.yml: add nolintlint, fix found issues

The errrolint linter can finally ignore errors from Close,
and it also ignores direct comparisons of errors from x/sys/unix.

Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
Kir Kolyshkin
2025-03-21 14:31:40 -07:00
parent 65e0f2b719
commit a638f1330b
7 changed files with 29 additions and 28 deletions
+2 -2
View File
@@ -49,7 +49,7 @@ func RecvFile(socket *os.File) (_ *os.File, Err error) {
for {
n, oobn, _, _, err = unix.Recvmsg(int(sockfd), name, oob, unix.MSG_CMSG_CLOEXEC)
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
if err != unix.EINTR {
break
}
}
@@ -128,7 +128,7 @@ func SendRawFd(socket *os.File, msg string, fd uintptr) error {
oob := unix.UnixRights(int(fd))
for {
err := unix.Sendmsg(int(socket.Fd()), []byte(msg), oob, nil, 0)
if err != unix.EINTR { //nolint:errorlint // unix errors are bare
if err != unix.EINTR {
return os.NewSyscallError("sendmsg", err)
}
}