chore: not using goproxy by default (#4613)

This commit is contained in:
Kevin Wan
2025-01-29 12:28:47 +08:00
committed by GitHub
parent 9213b8ac27
commit f669d84ce8
12 changed files with 39 additions and 98 deletions

View File

@@ -11,9 +11,9 @@ import (
// upgrade gets the latest goctl by
// go install github.com/zeromicro/go-zero/tools/goctl@latest
func upgrade(_ *cobra.Command, _ []string) error {
cmd := `GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go install github.com/zeromicro/go-zero/tools/goctl@latest`
cmd := `go install github.com/zeromicro/go-zero/tools/goctl@latest`
if runtime.GOOS == "windows" {
cmd = `set GOPROXY=https://goproxy.cn,direct && go install github.com/zeromicro/go-zero/tools/goctl@latest`
cmd = `go install github.com/zeromicro/go-zero/tools/goctl@latest`
}
info, err := execx.Run(cmd, "")
if err != nil {