mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-05-15 00:50:25 +02:00
cmd/cli: only emit error for running interfaces
While at it, also ensure setDNS/resetDNS return a wrapped error on Darwin/Windows, so the caller can decide whether to print the error to users.
This commit is contained in:
committed by
Cuong Manh Le
parent
5145729ab1
commit
fdb82f6ec3
@@ -2223,3 +2223,8 @@ func absHomeDir(filename string) string {
|
||||
}
|
||||
return filepath.Join(dir, filename)
|
||||
}
|
||||
|
||||
// ifaceUp reports whether the net interface is up.
|
||||
func ifaceUp(iface *net.Interface) bool {
|
||||
return iface != nil && iface.Flags&net.FlagUp != 0
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user