From 9365a29d136cae4b09626c29235929ddcf348ca8 Mon Sep 17 00:00:00 2001 From: Marten Seemann Date: Wed, 19 May 2021 11:21:31 -0700 Subject: [PATCH] fix staticcheck --- sockets.go | 2 -- sockets_linux.go | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/sockets.go b/sockets.go index fd63908..c2eb3fd 100644 --- a/sockets.go +++ b/sockets.go @@ -3,13 +3,11 @@ package sockets import ( "sync" - logging "github.com/ipfs/go-log" manet "github.com/multiformats/go-multiaddr-net" ) var ( mu sync.Mutex - log = logging.Logger("socket-activation") initFn = func() {} initialized = false listeners = make(map[string][]manet.Listener) diff --git a/sockets_linux.go b/sockets_linux.go index ed3c045..70ea6cf 100644 --- a/sockets_linux.go +++ b/sockets_linux.go @@ -9,9 +9,12 @@ import ( "syscall" activation "github.com/coreos/go-systemd/v22/activation" + logging "github.com/ipfs/go-log" manet "github.com/multiformats/go-multiaddr-net" ) +var log = logging.Logger("socket-activation") + func isListening(file *os.File) (bool, error) { ret, err := syscall.GetsockoptInt(int(file.Fd()), syscall.SOL_SOCKET, syscall.SO_ACCEPTCONN) return ret == 1, err