Skip to content

kshitijbahul/go-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Adding a command using Cobra

Eg Adding a command called list use

go install github.com/spf13/cobra-cli

cobra-cli init github.com/kshitijbahul/go-cli -a "Kshitij Bahul"

cobra-cli add list

To add a new Flag for the commands globally

-> Add it to the Root file

To add a new Flag for the commands locally i.e only for a specific command

-> Add the Flag to the individual file of teh command

Add a priority using

./go-cli add "Top Priority" -p1

Mark a todo as done

go run main.go done (a todo)

Viper configuration Management

To use the program set the env variable

```export TODO_DATAFILE=$HOME/customTodos.json````

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages