INNER CODE UNIT · Go
addRootCommands
pace/bricks · cmd/pb/main.go:28
func addRootCommands(rootCmd *cobra.Command) {
var restSource string
rootCmdNew := &cobra.Command{
Use: "new NAME",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {
service.New(args[0], service.NewOptions{
RestSource: restSource,
})
},
}
rootCmdNew.Flags().StringVar(&restSource, "source", "", "OpenAPIv3 source (URI / path) to use for generation")
rootCmd.AddCommand(rootCmdNew)
rootCmdClone := &cobra.Command{
Use: "clone NAME",
Args: cobra.ExactArgs(1),
Run: func(cmd *cobra.Command, args []string) {