[client] Fix staticcheck findings from the updated golangci-lint (#7266)

* Fix staticcheck findings reported by the updated golangci-lint

* Skip the receive error log when the local context is done
This commit is contained in:
Viktor Liu
2026-08-20 16:50:50 +02:00
committed by GitHub
parent e206f8827d
commit e4b8bf39d2
14 changed files with 37 additions and 34 deletions
+2 -2
View File
@@ -45,8 +45,8 @@ func daemonServerOptions(network string) []grpc.ServerOption {
return nil
}
creds := ipcauth.NewTransportCredentials()
if creds == nil {
creds := ipcauth.NewTransportCredentials() //nolint:staticcheck
if creds == nil { //nolint:staticcheck // nil only on platforms without a peer-identity primitive
log.Warnf("daemon IPC has no peer-identity primitive on %s: privileged operations will be denied", runtime.GOOS)
return nil
}
+2 -2
View File
@@ -27,8 +27,8 @@ func listenOnAddress(addr string) (*socketListener, error) {
}
if network == "npipe" {
listener, path, err := listenNamedPipe(address)
if err != nil {
listener, path, err := listenNamedPipe(address) //nolint:staticcheck
if err != nil { //nolint:staticcheck // always errors on non-Windows builds
return nil, err
}
return &socketListener{Listener: listener, network: network, address: path}, nil