Feature: Add goctl env (#1557)
This commit is contained in:
17
tools/goctl/env/env.go
vendored
Normal file
17
tools/goctl/env/env.go
vendored
Normal 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
|
||||
}
|
||||
Reference in New Issue
Block a user