A simple command-line TODO application written in Go that allows you to manage your tasks efficiently.
- Display all todos: View a list of all your tasks with their completion status
- Add new todos: Create new tasks with custom titles
- Edit existing todos: Update the titles of your existing tasks
- Toggle completion status: Mark tasks as completed or incomplete
- Delete todos: Remove tasks with a confirmation prompt before deletion
- Persistent storage: All todos are saved to a JSON file for persistence between sessions
- Go 1.13 or higher
-
Clone this repository:
git clone https://github.com/yourusername/go-todo-app.git cd go-todo-app
-
Build the application:
go build -o todo
-
Run the application:
./todo
Or simply use:
go run main.go
The application provides a simple menu-driven interface:
- Display all todos - Shows all your current tasks
- Add a new todo - Create a new task
- Edit a todo - Modify an existing task
- Toggle todo completion - Mark a task as completed or incomplete
- Delete a todo - Remove a task (with confirmation)
- Exit - Close the application
All todos are stored in a file named todos.json
in the same directory as the application. This file is automatically created when you first run the application.
Each todo item contains:
- ID: Unique identifier for the task
- Title: The description of the task
- Completed: Boolean indicating whether the task is completed
- CreatedAt: Timestamp when the task was created
- UpdatedAt: Timestamp when the task was last updated