Skip to content

Instantly share code, notes, and snippets.

@bl4ckcontact
Created July 8, 2015 05:58
Show Gist options
  • Save bl4ckcontact/731e7b490893006375cd to your computer and use it in GitHub Desktop.
Save bl4ckcontact/731e7b490893006375cd to your computer and use it in GitHub Desktop.
type Connection struct {
hostID string
intIndex int
}
// Run method initiates a new session with the scattermux server.
func (i *Connection) Run(args []string) int {
interfaces, err := net.Interfaces()
for _, inter := range interfaces {
fmt.Println(inter.Index, inter.HardwareAddr)
if index := inter.Index == 1; err == nil {
fmt.Println(inter.Name, "-->", index)
}
}
return 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment