From f53c8f4117533e8b1979f1e1f4d7d0f87cab447e Mon Sep 17 00:00:00 2001 From: crusader Date: Sat, 2 Dec 2017 00:43:09 +0900 Subject: [PATCH] ing --- net/gateway/gateway_darwin.go | 4 ++-- net/gateway/gateway_freebsd.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/gateway/gateway_darwin.go b/net/gateway/gateway_darwin.go index 481d9bf..aad613d 100644 --- a/net/gateway/gateway_darwin.go +++ b/net/gateway/gateway_darwin.go @@ -5,11 +5,11 @@ import ( "os/exec" ) -func DiscoverGateway() (net.IP, string, error) { +func DiscoverGateway() (ip net.IP, iface string, err error) { routeCmd := exec.Command("netstat", "-rn") output, err := routeCmd.CombinedOutput() if err != nil { - return nil, err + return nil, "", err } return parseDarwinRouteGet(output) diff --git a/net/gateway/gateway_freebsd.go b/net/gateway/gateway_freebsd.go index 4942c27..035c22e 100644 --- a/net/gateway/gateway_freebsd.go +++ b/net/gateway/gateway_freebsd.go @@ -9,7 +9,7 @@ func DiscoverGateway() (ip net.IP, iface string, err error) { routeCmd := exec.Command("netstat", "-rn") output, err := routeCmd.CombinedOutput() if err != nil { - return nil, err + return nil, "", err } return parseBSDSolarisNetstat(output)