Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NewCmd = &cobra.Command{ Use: "generate::project", Short: "Generate new project", Long: `project create succefully`, Run: func(cmd *cobra.Command, args []string) { var c config c.getConfig() input := input{ param: args[0], path: c.ModelPath, errorLine: "Model already exists! ", successLine: "File created successfully ", } if len(args[0]) == 0 { fmt.Println("Please provide a valid command") return } err := createComplex("./"+strcase.ToLowerCamel(input.param), strcase.ToLowerCamel(input.param)) if err != nil { fmt.Println("Error", err) return } fmt.Println(input.successLine, input.param) return }, }
NewCmd represents the hello command
View Source
var RootCmd = &cobra.Command{ Use: "fiber-plus", Short: "An example of cobra", Long: `This application shows how to create modern CLI applications in go using Cobra CLI library`, Run: func(cmd *cobra.Command, args []string) {}, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.