mirror of
https://github.com/zeromicro/go-zero.git
synced 2026-05-13 09:50:00 +08:00
19 lines
348 B
Go
19 lines
348 B
Go
|
|
package upgrade
|
||
|
|
|
||
|
|
import (
|
||
|
|
"fmt"
|
||
|
|
|
||
|
|
"github.com/tal-tech/go-zero/tools/goctl/rpc/execx"
|
||
|
|
"github.com/urfave/cli"
|
||
|
|
)
|
||
|
|
|
||
|
|
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
|
||
|
|
}
|