Skip to content

Commit 453cb70

Browse files
clean up cmds (#3)
1 parent fb2a61b commit 453cb70

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

cmd/commands/root.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ var rootCmd = &cobra.Command{
1414
Use: "tickgit",
1515
Short: "Tickets as config",
1616
Long: `tickgit is a tool for helping you manage tickets and todos in your codebase, as a part of your git history`,
17-
Run: func(cmd *cobra.Command, args []string) {},
1817
}
1918

2019
// Execute adds all child commands to the root command and sets flags appropriately.
@@ -26,13 +25,5 @@ func Execute() {
2625
}
2726

2827
func init() {
29-
// Here you will define your flags and configuration settings.
30-
// Cobra supports persistent flags, which, if defined here,
31-
// will be global for your application.
3228

33-
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default is $HOME/.tickgit.yaml)")
34-
35-
// Cobra also supports local flags, which will only run
36-
// when this action is called directly.
37-
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
3829
}

cmd/commands/status.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import (
1010
)
1111

1212
func init() {
13-
rootCmd.AddCommand(versionCmd)
13+
rootCmd.AddCommand(statusCmd)
1414
}
1515

1616
func handleError(err error) {
@@ -19,7 +19,7 @@ func handleError(err error) {
1919
}
2020
}
2121

22-
var versionCmd = &cobra.Command{
22+
var statusCmd = &cobra.Command{
2323
Use: "status",
2424
Short: "Print a status report of the current directory",
2525
Long: ``,

0 commit comments

Comments
 (0)