Open jesusprubio opened 7 months ago
So, you mean to define a new interface called NetworkInterface that will check the stats? and create implementation for each one ?
type NetworkInterface interface {
Name() string
IsActive() (bool, error)
Stats() (map[string]interface{}, error)
Type() string
Scan() ([]string, error)
}
The idea is to print information about active interfaces to confirm that at least one is connected. It is a common check when troubleshooting this kind of problems.
Return active interfaces, error if none.