From f955afc850693247dccb70bf470a3c88b6109b94 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Fri, 18 Mar 2022 00:38:35 -0400 Subject: cmd: refactor commands --- cmd/update.go | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'cmd/update.go') diff --git a/cmd/update.go b/cmd/update.go index 0714abe..7047fd9 100644 --- a/cmd/update.go +++ b/cmd/update.go @@ -4,9 +4,7 @@ import ( // "encoding/json" "github.com/pablotron/cvez/nvdmirror" "github.com/spf13/cobra" - "github.com/rs/zerolog" "github.com/rs/zerolog/log" - "time" ) var updateCmd = &cobra.Command{ @@ -16,10 +14,6 @@ var updateCmd = &cobra.Command{ Long: `Update local NVD mirror.`, Run: func(cmd *cobra.Command, args []string) { - // set global logging options - zerolog.TimeFieldFormat = time.RFC3339 - zerolog.SetGlobalLevel(zerolog.InfoLevel) - // create cache cache, err := nvdmirror.NewJsonCache("stuff/cache.json.gz") if err != nil { @@ -38,7 +32,3 @@ var updateCmd = &cobra.Command{ nvdmirror.Sync(config, &cache, "stuff") }, } - -func init() { - rootCmd.AddCommand(updateCmd) -} -- cgit v1.2.3