This is a simple 6CA5 command-line interface (CLI) application for managing a todo list, written in Go. It supports adding, listing, and deleting todo items, and stores the data in a CSV file.
cmd/
add.go
: Implements theadd
command.delete.go
: Implements thedelete
command.list.go
: Implements thelist
command.
data/
data.csv
: Stores the todo items.
models/
todo.go
: Defines theTodoItem
struct.
utils/
csv_utils.go
: Contains utility functions for reading from and writing to the CSV file.
main.go
: The entry point of the application.
-
Clone the repository:
git clone https://github.com/chetanr25/go_todo.git cd go_todo
-
Install the dependencies:
go mod tidy
-
Build the application:
go build -o todo
The CLI supports the following commands:
Add a new todo item to the list.
./todo add "Your todo item title"
List all the todo items.
./todo list
Delete a todo item by its ID.
./todo delete <id>