jesusprubio / up

📶 Troubleshoot problems with your Internet connection
MIT License
446 stars 20 forks source link

Protocol: ethernet #43

Open jesusprubio opened 7 months ago

jesusprubio commented 7 months ago

Return active interfaces, error if none.

DnFreddie commented 3 days 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)
}

jesusprubio commented 3 days ago

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.