ghw
ghw copied to clipboard
Can't get MAC address in macOS Monterey, netFillInfo not implemented on darwin
Can't get MAC address in macOS Monterey. Also Disks not return any Serial number.
Error getting network info: netFillInfo not implemented on darwin
Hi @sonvirgo thank you for the issue. As noted in the README, we only have partial support for MacOS, unfortunately. We do not support network discovery for MacOS currently.
As for the Disk missing serial number information, can you please run the following and let us know what you get?
package main
import (
"fmt"
"github.com/jaypipes/ghw"
)
func main() {
block, err := ghw.Block()
if err != nil {
fmt.Printf("Error getting block storage info: %v", err)
}
fmt.Printf("%v\n", block)
for _, disk := range block.Disks {
fmt.Printf(" %v\n", disk)
if disk.SerialNumber != "" {
fmt.Print("No serial number")
} else {
fmt.Printf("Serial number: %s\n", disk.SerialNumber)
}
for _, part := range disk.Partitions {
fmt.Printf(" %v\n", part)
}
}
}