Skip to content

ssmf/cli-todo-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cli-todo-app

Small cli to do list built with Go

Installation

In order to install this program, you need to have golang installed, you can get it here

To install all the files, in our cli type:

git clone git@github.com:ssmf/cli-todo-app.git

Alternatively, you may just download the zip file

Please note that the exe file must be in the same directory as the data.json file

Dependencies

Usage

In order to use the program, we just type the name of it in our cli and pass a flag to it:

./main.exe -help

The program works primarly on using flags, passing in either none or 1 argument.

The flag works by itself (meaning, not parsing any value) if the value we want to define is bool (e.g.. if the task is done), We pass in a value if The value is not bool and we want to specify it (e.g. -name [value])

Here is a list of all flags available:

  • -add -> Specifies if user wants to add a new task
  • -rm -> Specifies if user wants to remove an existing task
  • -name [value] -> Defines task name
  • -done -> Defines if task is done, if not used, value is false
  • -list -> Displays current list of todos
  • -help -> Displays all commands and their roles

(note that you can also get this list by parsing the -help flag)

Here are examples of using the flags:

./main.exe -help
./main.exe -add -name "Read a book"
./main.exe -rm -name "Read a book"
./main.exe -list
./main.exe -add -name "Write some code" -done
./main.exe -name "Write some code" -done

If the value doesn't contain any spaces (e.g. read instead of "read a book") we do not need to use quotation marks

About

cli to do list built with go

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages