init
This commit is contained in:
24
cmd/root.go
Normal file
24
cmd/root.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
|
||||
var jsonFlag bool
|
||||
|
||||
var rootCmd = &cobra.Command{
|
||||
Use: "ax",
|
||||
Short: "The axolotl issue tracker",
|
||||
}
|
||||
|
||||
func Execute() {
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.PersistentFlags().BoolVar(&jsonFlag, "json", false, "output as JSON")
|
||||
}
|
||||
Reference in New Issue
Block a user