Skip to content

Commit 83ca521

Browse files
committed
add go1 version for golang latest stable version
1 parent e7eda88 commit 83ca521

2 files changed

Lines changed: 27 additions & 22 deletions

File tree

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,14 @@ version list in [golang/dl](https://github.com/golang/dl)
109109

110110
```bash
111111
# switch golang version
112-
export PATH=/opt/go/sdk/go1.23/bin:$PATH
112+
export PATH=/opt/go/sdk/go1/bin:$PATH
113113
```
114114

115115
.vscode/settings.json
116116

117117
```json
118118
{
119-
"go.goroot": "/opt/go/sdk/go1.23",
119+
"go.goroot": "/opt/go/sdk/go1",
120120
"go.gopath": "/root/.go"
121121
}
122122
```
@@ -127,7 +127,7 @@ golang private mod settings
127127

128128
```json
129129
{
130-
"go.goroot": "/opt/go/sdk/go1.23",
130+
"go.goroot": "/opt/go/sdk/go1",
131131
"go.gopath": "/root/.go",
132132
"go.toolsEnvVars": {
133133
"GOPROXY": "https://athens-proxy.townsy.io,direct",
@@ -263,7 +263,7 @@ use the linked major version
263263

264264
```json
265265
{
266-
"go.goroot": "/opt/go/sdk/go1.23",
266+
"go.goroot": "/opt/go/sdk/go1",
267267
"go.gopath": "/root/.go",
268268
"go.toolsEnvVars": {
269269
"GOBIN": "/opt/go/bin"

install-virtualenv.sh

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,43 +21,48 @@ rm -rf $GOPATH/bin/$GO1_25
2121

2222
# 软链大版本 方便升级
2323
cd /opt/go/bin
24+
# 项目稳定版本, 默认
2425
ln -sf /opt/go/sdk/$GO1_23/bin/go go1.23
25-
ln -sf /opt/go/sdk/$GO1_25/bin/go go1.25
2626
ln -sf /opt/go/sdk/$GO1_23/bin/go go
27+
# golang最新稳定版
28+
ln -sf /opt/go/sdk/$GO1_25/bin/go go1.25
29+
ln -sf /opt/go/sdk/$GO1_25/bin/go go1
2730

2831
cd /opt/go/sdk
2932
ln -sf $GO1_23 go1.23
30-
ln -sf $GO1_25 go1.25
3133
ln -sf $GO1_23 go
3234

35+
ln -sf $GO1_25 go1.25
36+
ln -sf $GO1_25 go1
37+
3338
# vscode golang tools, build with latest golang
3439
# https://github.com/golang/vscode-go/blob/master/docs/tools.md
3540
export PATH=$GOPATH/bin:$PATH
3641

37-
# cd hack/tools && go1.25 install tool
42+
# cd hack/tools && go1 install tool
3843

3944
# vscode dev
40-
go1.25 install golang.org/x/tools/gopls@latest
41-
go1.25 install github.com/go-delve/delve/cmd/dlv@latest
42-
go1.25 install github.com/golang/vscode-go/vscgo@latest
43-
go1.25 install github.com/haya14busa/goplay/cmd/goplay@latest
44-
go1.25 install github.com/fatih/gomodifytags@latest
45-
go1.25 install github.com/josharian/impl@latest
46-
go1.25 install github.com/cweill/gotests/gotests@latest
47-
go1.25 install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
45+
go1 install golang.org/x/tools/gopls@latest
46+
go1 install github.com/go-delve/delve/cmd/dlv@latest
47+
go1 install github.com/golang/vscode-go/vscgo@latest
48+
go1 install github.com/haya14busa/goplay/cmd/goplay@latest
49+
go1 install github.com/fatih/gomodifytags@latest
50+
go1 install github.com/josharian/impl@latest
51+
go1 install github.com/cweill/gotests/gotests@latest
52+
go1 install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.4.0
4853

4954
# protobuf
5055
# https://github.com/protocolbuffers/protobuf-go
51-
go1.25 install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
56+
go1 install google.golang.org/protobuf/cmd/protoc-gen-go@v1.31.0
5257
# https://github.com/grpc/grpc-go
53-
go1.25 install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
54-
go1.25 install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.16.2
55-
go1.25 install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.16.2
58+
go1 install google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.3.0
59+
go1 install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@v2.16.2
60+
go1 install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.16.2
5661

5762
# my dev
58-
go1.25 install golang.org/x/perf/cmd/benchstat@latest
59-
go1.25 install github.com/ifooth/devcontainer/cmd/dev@v0.0.1
60-
go1.25 install github.com/ifooth/devcontainer/cmd/gen-lint@v0.0.1
63+
go1 install golang.org/x/perf/cmd/benchstat@latest
64+
go1 install github.com/ifooth/devcontainer/cmd/dev@v0.0.1
65+
go1 install github.com/ifooth/devcontainer/cmd/gen-lint@v0.0.1
6166

6267
# clean cache
6368
rm -rf /opt/go/pkg

0 commit comments

Comments
 (0)