标签:
package main import ( "fmt" "net" ) func main() { interfaces, err := net.Interfaces() if err != nil { panic("Error:" + err.Error()) } for _, inter := range interfaces { fmt.Println(inter.Name) fmt.Println(inter.Index) fmt.Println(inter.HardwareAddr) } }
标签:
原文地址:http://my.oschina.net/lengxugz/blog/477814