VsCode中安装golang扩展
# 一、golang
讷河之代码自动补全
Ctrl+Shift+p
命令,输入setting
,找到setting.json
打开setting.json
{
"workbench.iconTheme": "material-icon-theme",
"git.ignoreWindowsGit27Warning": true,
"vsicons.dontShowNewVersionMessage": true,
"terminal.integrated.profiles.windows": {
"Git-Bash": {
"path": "D:\\Git\\Git\\bin\\bash.exe",
"args": []
},
"win-terminal": {
"path": "C:\\Users\\Administrator\\AppData\\Local\\Microsoft\\WindowsApps\\wt.exe",
"args": []
},
},
"go.gopath": "E:\\Github-Project\\GO-Project",
"go.goroot": "D:\\Golang\\go1.18.8",
"go.useCodeSnippetsOnFunctionSuggest": true,
"go.useCodeSnippetsOnFunctionSuggestWithoutType": true,
"go.inferGopath": true,
"go.gotoSymbol.includeImports": true,
"go.gocodePackageLookupMode": "go",
"go.autocompleteUnimportedPackages": true,
......
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# 二、安装更新扩展
- 重启
vscode -> ctrl+shift+p -> go: install/update tools
Tools environment: GOPATH=E:\Github-Project\GO-Project, GOBIN=E:\Github-Project\GO-Project\bin
Installing 7 tools at the configured GOBIN: E:\Github-Project\GO-Project\bin in module mode.
gotests
gomodifytags
impl
goplay
dlv
staticcheck
gopls
Installing github.com/cweill/gotests/gotests@v1.6.0 (E:\Github-Project\GO-Project\bin\gotests.exe) SUCCEEDED
Installing github.com/fatih/gomodifytags@v1.16.0 (E:\Github-Project\GO-Project\bin\gomodifytags.exe) SUCCEEDED
Installing github.com/josharian/impl@v1.1.0 (E:\Github-Project\GO-Project\bin\impl.exe) SUCCEEDED
Installing github.com/haya14busa/goplay/cmd/goplay@v1.0.0 (E:\Github-Project\GO-Project\bin\goplay.exe) SUCCEEDED
Installing github.com/go-delve/delve/cmd/dlv@latest (E:\Github-Project\GO-Project\bin\dlv.exe) SUCCEEDED
Installing honnef.co/go/tools/cmd/staticcheck@latest (E:\Github-Project\GO-Project\bin\staticcheck.exe) SUCCEEDED
Installing golang.org/x/tools/gopls@latest (E:\Github-Project\GO-Project\bin\gopls.exe) SUCCEEDED
All tools successfully installed. You are ready to Go. :)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
上次更新: 2024/04/09, 16:48:42
- 01
- AWS NAT-NetWork-Firwalld配置(一)04-09
- 02
- AWS NAT-NetWork-Firwalld配置(二)04-09
- 03
- kubernetes部署minio对象存储01-18