package main import ( "fmt" "github.com/StackExchange/wmi" ) type gpuInfo struct { Name string } func getGPUInfo() { var gpuinfo []gpuInfo err := wmi.Query("Select * from Win32_VideoController", &gpuinfo) if err != nil { return } fmt.Printf("GPU:=", gpuinfo[0].Name) } func main() { getGPUInfo() }