summaryrefslogtreecommitdiffhomepage
path: root/ipc
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-12-09 17:55:50 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2021-12-09 23:15:55 +0100
commit9c9e7e2724340280d0ca4ff29c067f2d144562c0 (patch)
tree239826ccafe70e5cee73936d9bcea8989dd33899 /ipc
parent2dd424e2d808703339688ff78e32ed30cd0dfe87 (diff)
global: apply gofumpt
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ipc')
-rw-r--r--ipc/namedpipe/file.go6
-rw-r--r--ipc/namedpipe/namedpipe_test.go2
-rw-r--r--ipc/uapi_bsd.go1
-rw-r--r--ipc/uapi_linux.go1
-rw-r--r--ipc/uapi_unix.go4
5 files changed, 7 insertions, 7 deletions
diff --git a/ipc/namedpipe/file.go b/ipc/namedpipe/file.go
index 9c2481d..c5dd48a 100644
--- a/ipc/namedpipe/file.go
+++ b/ipc/namedpipe/file.go
@@ -22,8 +22,10 @@ import (
type timeoutChan chan struct{}
-var ioInitOnce sync.Once
-var ioCompletionPort windows.Handle
+var (
+ ioInitOnce sync.Once
+ ioCompletionPort windows.Handle
+)
// ioResult contains the result of an asynchronous IO operation
type ioResult struct {
diff --git a/ipc/namedpipe/namedpipe_test.go b/ipc/namedpipe/namedpipe_test.go
index 0573d0f..84d2987 100644
--- a/ipc/namedpipe/namedpipe_test.go
+++ b/ipc/namedpipe/namedpipe_test.go
@@ -169,7 +169,7 @@ func TestDialAccessDeniedWithRestrictedSD(t *testing.T) {
}
}
-func getConnection(cfg *namedpipe.ListenConfig) (client net.Conn, server net.Conn, err error) {
+func getConnection(cfg *namedpipe.ListenConfig) (client, server net.Conn, err error) {
pipePath := randomPipePath()
if cfg == nil {
cfg = &namedpipe.ListenConfig{}
diff --git a/ipc/uapi_bsd.go b/ipc/uapi_bsd.go
index 6deaa87..6c85b40 100644
--- a/ipc/uapi_bsd.go
+++ b/ipc/uapi_bsd.go
@@ -54,7 +54,6 @@ func (l *UAPIListener) Addr() net.Addr {
}
func UAPIListen(name string, file *os.File) (net.Listener, error) {
-
// wrap file in listener
listener, err := net.FileListener(file)
diff --git a/ipc/uapi_linux.go b/ipc/uapi_linux.go
index e03a00b..30a8eb4 100644
--- a/ipc/uapi_linux.go
+++ b/ipc/uapi_linux.go
@@ -51,7 +51,6 @@ func (l *UAPIListener) Addr() net.Addr {
}
func UAPIListen(name string, file *os.File) (net.Listener, error) {
-
// wrap file in listener
listener, err := net.FileListener(file)
diff --git a/ipc/uapi_unix.go b/ipc/uapi_unix.go
index 57caf21..6f1ee47 100644
--- a/ipc/uapi_unix.go
+++ b/ipc/uapi_unix.go
@@ -33,7 +33,7 @@ func sockPath(iface string) string {
}
func UAPIOpen(name string) (*os.File, error) {
- if err := os.MkdirAll(socketDirectory, 0755); err != nil {
+ if err := os.MkdirAll(socketDirectory, 0o755); err != nil {
return nil, err
}
@@ -43,7 +43,7 @@ func UAPIOpen(name string) (*os.File, error) {
return nil, err
}
- oldUmask := unix.Umask(0077)
+ oldUmask := unix.Umask(0o077)
defer unix.Umask(oldUmask)
listener, err := net.ListenUnix("unix", addr)