Boilerplate for all operations

This commit is contained in:
2022-01-19 15:30:30 -06:00
parent 9e67002b0d
commit d597da3b64
16 changed files with 89 additions and 173 deletions

View File

@@ -1,5 +1,5 @@
/*
Copyright © 2022 NAME HERE <EMAIL ADDRESS>
Copyright © 2022 Brian Buller <brian@bullercodeworks.com>
*/
package cmd
@@ -20,21 +20,14 @@ and usage of using your command. For example:
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println("start called")
},
RunE: opStart,
}
func init() {
rootCmd.AddCommand(startCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// startCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// startCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}
func opStart(cmd *cobra.Command, args []string) error {
fmt.Println("start called")
return nil
}