---
tags: Golang-multiversion-windows
---
# Golang 多版本 Windows
contributed by < `shino wu` >
## 安裝 go 版本管理器
- Releases: https://github.com/voidint/g/releases
1. 若使用 Windows 環境以及 x64 CPU, 下載圖中框選的 zip

2. 解壓縮至你想放置的資料夾(解壓縮後的資料夾改名為 g)
- 範例路徑: C:\Users\shino_wu\Documents\g
- 路徑底下會有 g.exe

3. 設定 Windows 環境變數
a.

b.

c. 紅框選取的部分皆要設定

4. 開啟 cmd
- 輸入以下指令
```
g -help
```

5. 安裝 go
- 輸入以下指令, 此範例安裝 go 1.20.6 以及 go 1.18.10
```
g install 1.20.6
g install 1.18.10
```
6. 顯示環境有哪些 go version
```
g ls
```

7. 確認當前使用的 go 版本
```
go version
```
