From 9eb5a5a160099547c40b654fc3d38590c5d67171 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Sun, 20 Feb 2022 21:46:38 -0500 Subject: add cobra dep, add cmd/ --- cmd/cmd.go | 2 ++ cmd/root.go | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) create mode 100644 cmd/cmd.go create mode 100644 cmd/root.go (limited to 'cmd') diff --git a/cmd/cmd.go b/cmd/cmd.go new file mode 100644 index 0000000..faf2b75 --- /dev/null +++ b/cmd/cmd.go @@ -0,0 +1,2 @@ +// Command-line interface +package cmd diff --git a/cmd/root.go b/cmd/root.go new file mode 100644 index 0000000..5dbfdac --- /dev/null +++ b/cmd/root.go @@ -0,0 +1,29 @@ +package cmd + +import ( + "fmt" + "github.com/spf13/cobra" + "os" +) + +var rootCmd = &cobra.Command{ + Use: "cvez", + Short: "CVE utility tool.", + Long: ` + A Common Vulnerability (CVE), Common Platform Enumeration + (CPE), Common Vulnerability Scoring System (CVSS), and National + Vulnerability Database (NVD) feed parser. + `, + + Run: func(cmd *cobra.Command, args []string) { + // Do Stuff Here + }, +} + +func Execute() { + if err := rootCmd.Execute(); err != nil { + fmt.Println(err) + os.Exit(1) + } +} + -- cgit v1.2.3