diff options
author | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2021-12-18 02:29:55 +0300 |
---|---|---|
committer | Alexander Kiryukhin <a.kiryukhin@mail.ru> | 2022-02-23 22:06:16 +0300 |
commit | ad9f720b35a791647e96a6e9a042453db85ab544 (patch) | |
tree | e25e81cc3a6bf56b644addc1f8d6f46d955df1e0 /cmd/root.go | |
parent | 8f08151c005341fbc48745104578a8f7549a23d7 (diff) |
Diffstat (limited to 'cmd/root.go')
-rw-r--r-- | cmd/root.go | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/cmd/root.go b/cmd/root.go index ad372c1..6126a3e 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -4,12 +4,9 @@ import ( "fmt" "os" - "github.com/spf13/afero" "github.com/spf13/cobra" "github.com/spf13/viper" - - "github.com/neonxp/track/internal/tracker" ) var cfgFile string @@ -18,21 +15,12 @@ var cfgFile string var rootCmd = &cobra.Command{ Use: "track", Short: "Track your work or personal activities", - Long: `Track time spent for any work or personal activities`, + Long: `Track time spent for any work or personal activities`, } -var tr *tracker.Tracker - // Execute adds all child commands to the root command and sets flags appropriately. // This is called by main.main(). It only needs to happen once to the rootCmd. func Execute() { - fs := afero.NewOsFs() - var err error - tr, err = tracker.New(fs) - if err != nil { - panic(err) - return - } cobra.CheckErr(rootCmd.Execute()) } @@ -65,4 +53,3 @@ func initConfig() { fmt.Fprintln(os.Stderr, "Using config file:", viper.ConfigFileUsed()) } } - |