global: apply gofumpt
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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{}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user