Clean up cmd files + cmd line documentation

pull/8/head
isthisnagee 3 years ago
parent 6521e68ee3
commit 1c595d7c45

@ -32,14 +32,4 @@ This ID can be used in other commands.
func init() {
rootCmd.AddCommand(addCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// addCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// addCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

@ -57,14 +57,4 @@ var deleteCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(deleteCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// deleteCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// deleteCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

@ -62,14 +62,4 @@ var editCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(editCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// editCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// editCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

@ -62,14 +62,4 @@ var editNoteCmd = &cobra.Command{
func init() {
editCmd.AddCommand(editNoteCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// editNoteCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// editNoteCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

@ -27,14 +27,4 @@ var listCmd = &cobra.Command{
func init() {
rootCmd.AddCommand(listCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// listCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// listCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

@ -63,14 +63,4 @@ var noteCmd = &cobra.Command{
func init() {
addCmd.AddCommand(noteCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// noteCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// noteCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

@ -15,17 +15,15 @@ var cfgFile string
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "diary",
Short: "A brief description of your application",
Long: `A longer description that spans multiple lines and likely contains
examples and usage of using your application. 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.
Short: "A software engineer's log",
Long: `Use diary to keep track of your day.
Example:
$ diary add "Security meeting minutes"
33
$ diary add note 33 # opens in your $EDITOR
$ diary list today # Show all the entries added today
`,
// Uncomment the following line if your bare application
// has an action associated with it:
// Run: func(cmd *cobra.Command, args []string) { },
}
// Execute adds all child commands to the root command and sets flags appropriately.
@ -39,14 +37,6 @@ func Execute() {
func init() {
cobra.OnInitialize(InitApp)
// Here you will define your flags and configuration settings.
// Cobra supports persistent flags, which, if defined here,
// will be global for your application.
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.diary.toml)")
// Cobra also supports local flags, which will only run
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

@ -50,14 +50,4 @@ var todayCmd = &cobra.Command{
func init() {
listCmd.AddCommand(todayCmd)
// Here you will define your flags and configuration settings.
// Cobra supports Persistent Flags which will work for this command
// and all subcommands, e.g.:
// todayCmd.PersistentFlags().String("foo", "", "A help for foo")
// Cobra supports local flags which will only run when this command
// is called directly, e.g.:
// todayCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

Loading…
Cancel
Save