feat(goctl): Support gateway sample generation (#3049)

This commit is contained in:
anqiansong
2023-03-29 17:06:23 +08:00
committed by GitHub
parent 95b85336d6
commit 1904af2323
32 changed files with 1399 additions and 513 deletions

View File

@@ -1,6 +1,6 @@
package quickstart
import "github.com/spf13/cobra"
import "github.com/zeromicro/go-zero/tools/goctl/internal/cobrax"
const (
serviceTypeMono = "mono"
@@ -11,15 +11,9 @@ var (
varStringServiceType string
// Cmd describes the command to run.
Cmd = &cobra.Command{
Use: "quickstart",
Short: "quickly start a project",
RunE: run,
}
Cmd = cobrax.NewCommand("quickstart", cobrax.WithRunE(run))
)
func init() {
Cmd.Flags().StringVarP(&varStringServiceType,
"service-type", "t", "mono",
"specify the service type, supported values: [mono, micro]")
Cmd.Flags().StringVarPWithDefaultValue(&varStringServiceType, "service-type", "t", "mono")
}