Skip to content

Commit

Permalink
fix current golang
Browse files Browse the repository at this point in the history
  • Loading branch information
theFong committed Sep 5, 2023
1 parent 3e79610 commit 4059077
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .brev/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ asdf plugin add golang https://github.com/asdf-community/asdf-golang.git
asdf install golang 1.20
asdf global golang 1.20
asdf install
GO_VERSION=$(asdf list golang | tail -1 | tr -d '*' | awk '{$1=$1};1')
GO_VERSION=$(asdf current golang | awk '{print $2}')
GO_ROOT=$HOME/.asdf/installs/golang/$GO_VERSION/go
append_if_not_exist "export GOROOT=$GOROOT" ~/.zshrc
append_if_not_exist "export GOROOT=$GOROOT" ~/.bashrc
Expand Down
48 changes: 23 additions & 25 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
{
// gopls with gofumpt and import ordering
"go.useLanguageServer": true,
"gopls": {
"formatting.gofumpt": true,
},
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
},
},

// golangci-lint
"go.lintTool": "golangci-lint",
"go.lintFlags": [
"--fast"
],
"go.lintOnSave": "workspace",
"go.testTimeout": "240s"
"go.useLanguageServer": true,
"gopls": {
"formatting.gofumpt": true
},
"[go]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"[go.mod]": {
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
}
},
"go.lintTool": "golangci-lint",
"go.lintFlags": [
"--fast"
],
"go.lintOnSave": "workspace",
"go.testTimeout": "240s",
"go.goroot": "/home/ubuntu/.asdf/installs/golang/1.19/go"
}

0 comments on commit 4059077

Please sign in to comment.