From 41d890bb64eafe6c29e94c9656cc347daf324d29 Mon Sep 17 00:00:00 2001 From: Neil Alexander Date: Sun, 17 Apr 2022 18:02:25 +0100 Subject: [PATCH] Run `goimports` --- contrib/mobile/mobile_android.go | 1 + contrib/mobile/mobile_ios.go | 1 + contrib/mobile/mobile_other.go | 1 + src/core/debug.go | 14 ++++++++------ src/core/proto.go | 4 ++-- src/multicast/multicast_unix.go | 7 +++++-- src/multicast/multicast_windows.go | 7 +++++-- 7 files changed, 23 insertions(+), 12 deletions(-) diff --git a/contrib/mobile/mobile_android.go b/contrib/mobile/mobile_android.go index f3206ac..39bebec 100644 --- a/contrib/mobile/mobile_android.go +++ b/contrib/mobile/mobile_android.go @@ -1,3 +1,4 @@ +//go:build android // +build android package mobile diff --git a/contrib/mobile/mobile_ios.go b/contrib/mobile/mobile_ios.go index 253bbc0..fedee2d 100644 --- a/contrib/mobile/mobile_ios.go +++ b/contrib/mobile/mobile_ios.go @@ -1,3 +1,4 @@ +//go:build ios // +build ios package mobile diff --git a/contrib/mobile/mobile_other.go b/contrib/mobile/mobile_other.go index 7b7ed74..aceeb7e 100644 --- a/contrib/mobile/mobile_other.go +++ b/contrib/mobile/mobile_other.go @@ -1,3 +1,4 @@ +//go:build !android && !ios // +build !android,!ios package mobile diff --git a/src/core/debug.go b/src/core/debug.go index eb40679..ee1f1ed 100644 --- a/src/core/debug.go +++ b/src/core/debug.go @@ -3,14 +3,16 @@ package core -import "fmt" +import ( + "fmt" -import _ "net/http/pprof" -import "net/http" -import "runtime" -import "os" + "net/http" + _ "net/http/pprof" + "os" + "runtime" -import "github.com/gologme/log" + "github.com/gologme/log" +) // Start the profiler in debug builds, if the required environment variable is set. func init() { diff --git a/src/core/proto.go b/src/core/proto.go index 3045972..5af59cc 100644 --- a/src/core/proto.go +++ b/src/core/proto.go @@ -47,9 +47,9 @@ func (p *protoHandler) init(core *Core) { p.core = core p.nodeinfo.init(p) - p.selfRequests = make(map[keyArray]*reqInfo) + p.selfRequests = make(map[keyArray]*reqInfo) p.peersRequests = make(map[keyArray]*reqInfo) - p.dhtRequests = make(map[keyArray]*reqInfo) + p.dhtRequests = make(map[keyArray]*reqInfo) } // Common functions diff --git a/src/multicast/multicast_unix.go b/src/multicast/multicast_unix.go index 9c822fc..c59d876 100644 --- a/src/multicast/multicast_unix.go +++ b/src/multicast/multicast_unix.go @@ -3,8 +3,11 @@ package multicast -import "syscall" -import "golang.org/x/sys/unix" +import ( + "syscall" + + "golang.org/x/sys/unix" +) func (m *Multicast) _multicastStarted() { diff --git a/src/multicast/multicast_windows.go b/src/multicast/multicast_windows.go index 515412a..fa194ac 100644 --- a/src/multicast/multicast_windows.go +++ b/src/multicast/multicast_windows.go @@ -3,8 +3,11 @@ package multicast -import "syscall" -import "golang.org/x/sys/windows" +import ( + "syscall" + + "golang.org/x/sys/windows" +) func (m *Multicast) _multicastStarted() {