From 104ee66f5930f4a37ac84538c29a291bf1d08f4f Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Tue, 24 Jan 2023 20:27:22 +0800 Subject: Use cobra as command selector --- cmd/root.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 cmd/root.go (limited to 'cmd/root.go') diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 0000000..19bf463 --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,19 @@ +package cmd + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" +) + +var rootCmd = &cobra.Command{ + Use: "zk", +} + +func Execute() { + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} -- cgit v1.2.3