Skip to content

Commit

Permalink
remove version, remove Run empty func, comment formatting update, swi…
Browse files Browse the repository at this point in the history
…tch to filepath.join
  • Loading branch information
fantasticrabbit committed Dec 21, 2021
1 parent 83c7fe5 commit 6a49536
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package cmd
import (
"log"
"os"
"path/filepath"

"github.com/fantasticrabbit/ClickupCLI/internal"
"github.com/spf13/cobra"
Expand All @@ -12,18 +13,15 @@ import (
var (
cfgFile string
home, _ = os.UserHomeDir()
config_path = (home + "/.clickup")
config_file = (home + "/.clickup/config.yaml")
config_path = filepath.Join(home, ".clickup")
config_file = filepath.Join(home, ".clickup", "config.yaml")
)

var rootCmd = &cobra.Command{
Use: "clickup",
Short: "ClickupCLI allows access to ClickUp from the command line",
Long: `ClickupCLI allows you to use data from Clickup to drive scripts,
build tools, and send and receive data from your Clickup space.`,
Run: func(cmd *cobra.Command, args []string) {
},
Version: "v0.1.7",
}

func Execute() {
Expand All @@ -35,7 +33,7 @@ func init() {
rootCmd.PersistentFlags().StringVar(&cfgFile, "config", "", "config file (default: "+config_file+")")
}

// initConfig reads in config file, ENV variables if set, and determines authentication steps
// initConfig reads in config file, ENV variables if set, and determines authentication steps.
func initConfig() {
if cfgFile != "" {
viper.SetConfigFile(cfgFile)
Expand Down

0 comments on commit 6a49536

Please sign in to comment.