You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'd written a program in go 1.4 to retrieve mac addresses on windows and used to get the correct mac address.
With 1.5.1 however, I'm seeing a :00:00 appended to all the mac addresses on Windows (specifically Windows 7 Professional).
Is there a reason for this (or is it simply an error on my side)?
ifs, _ := net.Interfaces()
for _, v := range ifs {
h := v.HardwareAddr.String()
if len(h) == 0 {
continue
}
si.Macs = append(si.Macs, h)
}
Bjorn Graf in this thread reports: "on my Windows 10 Go 1.5,x (amd64 and 386) seems to find only the loopback pseudo-Interface with an all-00 mac while go1.4.2 lists the real interface."
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
golang 1.5 mac address on Windows has additional :00:00
net: golang 1.5 mac address on Windows has additional :00:00
Sep 19, 2015
Use Windows getmac command to verify interface
MAC addresses net package returns.
The test is to be enabled once issue #12691 is fixed.
Updates #12691
Change-Id: Ic28c83303590cb4d48ee025250d4b6e30683bfd4
Reviewed-on: https://go-review.googlesource.com/17632
Reviewed-by: Mikio Hara <mikioh.mikioh@gmail.com>
Run-TryBot: Alex Brainman <alex.brainman@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
I'd written a program in go 1.4 to retrieve mac addresses on windows and used to get the correct mac address.
With 1.5.1 however, I'm seeing a :00:00 appended to all the mac addresses on Windows (specifically Windows 7 Professional).
Is there a reason for this (or is it simply an error on my side)?
Bjorn Graf in this thread reports: "on my Windows 10 Go 1.5,x (amd64 and 386) seems to find only the loopback pseudo-Interface with an all-00 mac while go1.4.2 lists the real interface."
The text was updated successfully, but these errors were encountered: