From bf90447cc425b6cf80992191665e46146dacbeeb Mon Sep 17 00:00:00 2001 From: Arceliar Date: Sat, 7 Jul 2018 19:37:36 -0500 Subject: [PATCH] update admin socket error message and run gofmt --- src/yggdrasil/admin.go | 2 +- src/yggdrasil/defaults/defaults.go | 2 +- src/yggdrasil/defaults/defaults_darwin.go | 12 ++++++------ src/yggdrasil/defaults/defaults_linux.go | 12 ++++++------ src/yggdrasil/defaults/defaults_other.go | 12 ++++++------ src/yggdrasil/defaults/defaults_windows.go | 12 ++++++------ 6 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/yggdrasil/admin.go b/src/yggdrasil/admin.go index a8ac501..128b1d7 100644 --- a/src/yggdrasil/admin.go +++ b/src/yggdrasil/admin.go @@ -245,7 +245,7 @@ func (a *admin) listen() { case "tcp": a.listener, err = net.Listen("tcp", u.Host) default: - err = errors.New("protocol not supported") + err = errors.New(fmt.Sprint("protocol not supported: ", u.Scheme)) } } else { a.listener, err = net.Listen("tcp", a.listenaddr) diff --git a/src/yggdrasil/defaults/defaults.go b/src/yggdrasil/defaults/defaults.go index 6145539..753efc5 100644 --- a/src/yggdrasil/defaults/defaults.go +++ b/src/yggdrasil/defaults/defaults.go @@ -5,7 +5,7 @@ package defaults // for the platform being targeted. They must be set. type platformDefaultParameters struct { // Admin socket - DefaultAdminListen string + DefaultAdminListen string // TUN/TAP MaximumIfMTU int diff --git a/src/yggdrasil/defaults/defaults_darwin.go b/src/yggdrasil/defaults/defaults_darwin.go index 3a88274..778162c 100644 --- a/src/yggdrasil/defaults/defaults_darwin.go +++ b/src/yggdrasil/defaults/defaults_darwin.go @@ -6,13 +6,13 @@ package defaults // may be replaced by the running configuration. func GetDefaults() platformDefaultParameters { return platformDefaultParameters{ - // Admin + // Admin DefaultAdminListen: "tcp://localhost:9001", - // TUN/TAP - MaximumIfMTU: 65535, - DefaultIfMTU: 65535, - DefaultIfName: "auto", - DefaultIfTAPMode: false, + // TUN/TAP + MaximumIfMTU: 65535, + DefaultIfMTU: 65535, + DefaultIfName: "auto", + DefaultIfTAPMode: false, } } diff --git a/src/yggdrasil/defaults/defaults_linux.go b/src/yggdrasil/defaults/defaults_linux.go index 2c54d0f..85287ee 100644 --- a/src/yggdrasil/defaults/defaults_linux.go +++ b/src/yggdrasil/defaults/defaults_linux.go @@ -6,13 +6,13 @@ package defaults // may be replaced by the running configuration. func GetDefaults() platformDefaultParameters { return platformDefaultParameters{ - // Admin + // Admin DefaultAdminListen: "tcp://localhost:9001", - // TUN/TAP - MaximumIfMTU: 65535, - DefaultIfMTU: 65535, - DefaultIfName: "auto", - DefaultIfTAPMode: false, + // TUN/TAP + MaximumIfMTU: 65535, + DefaultIfMTU: 65535, + DefaultIfName: "auto", + DefaultIfTAPMode: false, } } diff --git a/src/yggdrasil/defaults/defaults_other.go b/src/yggdrasil/defaults/defaults_other.go index 29e71e8..d780872 100644 --- a/src/yggdrasil/defaults/defaults_other.go +++ b/src/yggdrasil/defaults/defaults_other.go @@ -6,13 +6,13 @@ package defaults // may be replaced by the running configuration. func GetDefaults() platformDefaultParameters { return platformDefaultParameters{ - // Admin + // Admin DefaultAdminListen: "tcp://localhost:9001", - // TUN/TAP - MaximumIfMTU: 65535, - DefaultIfMTU: 65535, - DefaultIfName: "none", - DefaultIfTAPMode: false, + // TUN/TAP + MaximumIfMTU: 65535, + DefaultIfMTU: 65535, + DefaultIfName: "none", + DefaultIfTAPMode: false, } } diff --git a/src/yggdrasil/defaults/defaults_windows.go b/src/yggdrasil/defaults/defaults_windows.go index 91e9e0e..83877d6 100644 --- a/src/yggdrasil/defaults/defaults_windows.go +++ b/src/yggdrasil/defaults/defaults_windows.go @@ -6,13 +6,13 @@ package defaults // may be replaced by the running configuration. func GetDefaults() platformDefaultParameters { return platformDefaultParameters{ - // Admin + // Admin DefaultAdminListen: "tcp://localhost:9001", - // TUN/TAP - MaximumIfMTU: 65535, - DefaultIfMTU: 65535, - DefaultIfName: "auto", - DefaultIfTAPMode: true, + // TUN/TAP + MaximumIfMTU: 65535, + DefaultIfMTU: 65535, + DefaultIfName: "auto", + DefaultIfTAPMode: true, } }