2024年10月18日 星期五

📝紀錄:Go 語言一些我常需要用到的資訊

Go 各版本的 Windows 支援程度

參閱官方Wiki:《Go for Microsoft Windows

安裝多版本的 Go

參閱官方說明:«Download and install»

首先先執行以下指令

go install golang.org/dl/go{你要的版本}@latest

然後再執行

go{你要的版本}} download

列出所有支援操作系統及架構

指令:

go tool dist list
輸出結果
js/wasm
linux/386
linux/amd64
linux/arm
windows/386
windows/amd64
windows/arm
windows/arm64

可以在後面加上-json 以 JSON格式輸出

加上-json後的輸出結果
[
        {
                "GOOS": "linux",
                "GOARCH": "386",
                "CgoSupported": true,
                "FirstClass": true
        },
        {
                "GOOS": "linux",
                "GOARCH": "amd64",
                "CgoSupported": true,
                "FirstClass": true
        },
        {
                "GOOS": "linux",
                "GOARCH": "arm",
                "CgoSupported": true,
                "FirstClass": true
        },
        
        // 下略……
]

參考自:impluse:《go列出所有支持的系统平台及其架构》

沒有留言:

張貼留言