How to set ip address to a given interface? is there any built-in function
or reference implementation?
On Sunday, 15 December 2013 15:00:02 UTC+5:30, Curtis Paul wrote:
>
> Any ideas on how to list all of the local IP Address and Hardware
> Addresses?
>
> I understand the following, it provides Hardware Address...but the
> Interface struct does not provide IP Address.
>
> interfaces, _ := net.Interfaces()
> for _, inter := range interfaces {
> fmt.Println(inter.Name, inter.HardwareAddr)
> }
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.