feat(goctl): Support gateway sample generation (#3049)
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user