You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/tools/goctl/upgrade/upgrade.go

21 lines
437 B
Go

package upgrade
import (
"fmt"
"github.com/tal-tech/go-zero/tools/goctl/rpc/execx"
"github.com/urfave/cli"
)
// Upgrade gets the latest goctl by
// go get -u github.com/tal-tech/go-zero/tools/goctl
func Upgrade(_ *cli.Context) error {
info, err := execx.Run("GO111MODULE=on GOPROXY=https://goproxy.cn/,direct go get -u github.com/tal-tech/go-zero/tools/goctl", "")
if err != nil {
return err
}
fmt.Print(info)
return nil
}