golang如何判断操作系统类型?

KunGo · · 18097 次点击
polaris
社区,需要你我一同完善!
runtime.GOARCH 返回当前的系统架构;runtime.GOOS 返回当前的操作系统。
#1
更多评论
switch runtime.GOOS { case "darwin": case "windows": case "linux": } go tool dist list -json 查找系统
#3