根据设备生成唯一ID go run main.go Window平台交叉编译 ./build.bat 编译参数为 -ldflags="-s -w" 编译后执行文件压缩体积 upx -9 deviceId_windows_amd64.exe 各平台可执行文件 output ├── deviceId_darwin_amd64 ├── deviceId_linux_amd64 └── deviceId_windows_amd64.exe