From 3e75f88d804598041dbcf4f3139d91c283acdeef Mon Sep 17 00:00:00 2001 From: Ben Burwell Date: Thu, 6 Feb 2020 14:03:38 -0500 Subject: finish adding flags --- cmd/root.go | 23 +++++++++++++++++++++++ 1 file changed, 23 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..09660f0 --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,23 @@ +package cmd + +import ( + "fmt" + "os" + + "github.com/spf13/cobra" +) + +func Execute() { + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} + +var rootCmd = &cobra.Command{ + Use: "wx", + Short: "wx is a front-end for NOAA's Aviation Weather Center", + Long: `A front-end for NOAA's Aviation Weather Center. +Capable of fetching weather information from the Center's Text Data Server +(TDS) and displaying it in various formats.`, +} -- cgit v1.2.3