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"
)
var IPv4RouteParser = regexp.MustCompile("^([a-z]+)+\\s+(\\d+\\.+\\d+.\\d.+\\d)+\\s+([a-zA-z]+)+\\s+(\\d+)+\\s+(\\d+)+\\s+([a-zA-Z]+\\d+)$")
var IPv4RouteTokens = 7
@ -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
}