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)