feat: Add goctl quickstart (#1889)

* Add goctl quickstart

* Format code

* Format code
This commit is contained in:
anqiansong
2022-05-13 12:23:24 +08:00
committed by GitHub
parent f486685e99
commit 52f060caae
13 changed files with 395 additions and 2 deletions

View File

@@ -0,0 +1,25 @@
package quickstart
import "github.com/spf13/cobra"
const (
serviceTypeMono = "mono"
serviceTypeMicro = "micro"
)
var (
varStringServiceType string
// Cmd describes the command to run.
Cmd = &cobra.Command{
Use: "quickstart",
Short: "quickly start a project",
RunE: run,
}
)
func init() {
Cmd.Flags().StringVarP(&varStringServiceType,
"service-type", "t", "mono",
"specify the service type, supported values: [mono, micro]")
}