adding windows GetDefaultRoute

This commit is contained in:
afeiszli
2022-08-23 00:33:48 -04:00
parent 4d9a07bf00
commit 878e3d848e
3 changed files with 34 additions and 11 deletions

View File

@@ -358,6 +358,13 @@ func GetNetclientPathSpecific() string {
}
}
func CheckIPAddress(ip string) error {
if net.ParseIP(ip) == nil {
return fmt.Errorf("ip address %s is invalid", ip)
}
return nil
}
// GetNewIface - Gets the name of the real interface created on Mac
func GetNewIface(dir string) (string, error) {
files, _ := os.ReadDir(dir)