env.go 279 B

12345678910111213141516
  1. package env
  2. import (
  3. "fmt"
  4. "github.com/spf13/cobra"
  5. "github.com/zeromicro/go-zero/tools/goctl/pkg/env"
  6. )
  7. func write(_ *cobra.Command, _ []string) error {
  8. if len(sliceVarWriteValue) > 0 {
  9. return env.WriteEnv(sliceVarWriteValue)
  10. }
  11. fmt.Println(env.Print())
  12. return nil
  13. }