A command-line tool for creating and managing a list of "to-do" item, keep track of items left in the todo list and saving the list in a file using the JSON format.
- Add a new "to-do" item.
- Save the list of "to-do" item to the current working directory in JSON format.
- Marking a "to-do" item as completed.
- Listing "to-do" items.
- Deleting a "to-do" item.
- Clone the repository
git clone [email protected]:hayohtee/todo.git
- Change into the project directory
cd todo
- Compile
go build -o todo ./cmd/todo
- Add new task
You can add new task either by using command-line arguments or from STDIN
Here is an example of using command-line arguments:\Here is an example of using STDIN./todo -add The name of the task you wanted to add
echo "The name of the task you wanted to add" | ./todo -add
- List all tasks
./todo -list
- Mark a task as completed
To mark a task as completed, you supply the position of the task in the list
Note positon starts from 1
Here is an example of completing task 1./todo -complete 1
- Show all available options
./todo -h
- Delete a task
To delete a task, you supply the position of the task in the list to -del flag
Here is an example of deleting task 1./todo -del 1