Open fxaxg opened 3 weeks ago
代码如下:
// GetMachineCode 获取机器码函数 func GetMachineCode() (string, error) { platformUUID, err := machine.GetPlatformUUID() if err != nil { return "", err } // 解析 platformUUID 并返回 return string(platformUUID), nil }
使用goreleaser打包到windows上运行正常,在Linux上运行提示panic: exec: "dmidecode": executable file not found in $PATH,在mac上提示sysctl: unknown oid 'machdep.cpu.signature'
panic: exec: "dmidecode": executable file not found in $PATH
sysctl: unknown oid 'machdep.cpu.signature'
代码如下:
使用goreleaser打包到windows上运行正常,在Linux上运行提示
panic: exec: "dmidecode": executable file not found in $PATH
,在mac上提示sysctl: unknown oid 'machdep.cpu.signature'