增加 常用 Go 包.

Signed-off-by: rick.chan <cy187lion@sina.com>
This commit is contained in:
rick.chan 2023-10-23 14:07:54 +08:00
parent a4e66bf0d7
commit 5a56fa69c9
1 changed files with 10 additions and 4 deletions

View File

@ -43,7 +43,7 @@ go install github.com/haya14busa/goplay/cmd/goplay@latest
go install honnef.co/go/tools/cmd/staticcheck@latest go install honnef.co/go/tools/cmd/staticcheck@latest
go install golang.org/x/tools/gopls@latest go install golang.org/x/tools/gopls@latest
go install golang.org/x/tools/cmd/godoc@latest go install golang.org/x/tools/cmd/godoc@latest
go install golang.org/x/tools/cmd/goimports go install golang.org/x/tools/cmd/goimports@latest
``` ```
### 1.3. VSCode 配置 ### 1.3. VSCode 配置
@ -89,9 +89,15 @@ $ ./hello
Hello, World! Hello, World!
``` ```
## 3. 常见问题 ## 3. 常用 Go 包
### 3.1. Snap 安装后 VSCode Go 插件报 Failed to run '/snap/bin/go env' error ```bash
go install github.com/cjbassi/gotop@latest
```
## 4. 常见问题
### 4.1. Snap 安装后 VSCode Go 插件报 Failed to run '/snap/bin/go env' error
进入 VSCode 用户配置(JSON),添加: 进入 VSCode 用户配置(JSON),添加:
@ -101,6 +107,6 @@ Hello, World!
}, },
``` ```
## 4. 外部参考资料 ## 5. 外部参考资料
1. [How to remove package installed with go get](https://www.golinuxcloud.com/remove-installed-package-with-go-get/) 1. [How to remove package installed with go get](https://www.golinuxcloud.com/remove-installed-package-with-go-get/)