go-zero/tools/goctl/env/env.go

17 lines
289 B
Go
Raw Normal View History

2022-02-21 10:19:33 +08:00
package env
import (
"fmt"
"github.com/spf13/cobra"
2022-02-21 10:19:33 +08:00
"github.com/zeromicro/go-zero/tools/goctl/pkg/env"
)
func write(_ *cobra.Command, args []string) error {
if len(sliceVarWriteValue) > 0 {
return env.WriteEnv(sliceVarWriteValue)
2022-02-21 10:19:33 +08:00
}
fmt.Println(env.Print(args...))
2022-02-21 10:19:33 +08:00
return nil
}