refact: i will just comment with 'Thank you Microsoft <3'

This commit is contained in:
evilsocket 2018-02-07 23:10:57 +01:00
commit 8a5916c685
4 changed files with 53 additions and 39 deletions

View file

@ -1,6 +1,9 @@
package net
import "regexp"
import (
"net"
"regexp"
)
// only matches gateway lines
var IPv4RouteParser = regexp.MustCompile("^(default|[0-9\\.]+)\\svia\\s([0-9\\.]+)\\sdev\\s(\\w+)\\s.*$")
@ -18,3 +21,8 @@ func IPv4RouteIsGateway(ifname string, tokens []string, f func(gateway string) (
return nil, nil
}
// see Windows version to understand why ....
func getInterfaceName(iface net.Interface) string {
return iface.Name
}