Open sonvirgo opened 1 month ago
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)
}
}
}
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) } } }
Thank you. Here the result
Unknown block device
No disk
I build the app with CGO_ENABLE-0 , does this affect the ghw?
Can't get MAC address in macOS Monterey. Also Disks not return any Serial number.