Feature: Add goctl env (#1557)

This commit is contained in:
anqiansong
2022-02-21 10:19:33 +08:00
committed by GitHub
parent 842656aa90
commit daa98f5a27
18 changed files with 1180 additions and 27 deletions

17
tools/goctl/env/env.go vendored Normal file
View File

@@ -0,0 +1,17 @@
package env
import (
"fmt"
"github.com/urfave/cli"
"github.com/zeromicro/go-zero/tools/goctl/pkg/env"
)
func Action(c *cli.Context) error {
write := c.StringSlice("write")
if len(write) > 0 {
return env.WriteEnv(write)
}
fmt.Println(env.Print())
return nil
}