This is a simple Command-Line To-Do App built with Go. It allows you to:
- ✅ Add tasks
- 📋 List tasks
- 🟢 Mark tasks as done
- 💾 Save tasks to a JSON file for persistence
- Clone the Repository:
git clone https://github.com/zbinx/todo-cli-go.git
cd todo-cli-go
- Ensure Go is Installed:
go version
If Go is not installed, download it from golang.org.
- Initialize Go Module:
go mod init todo-cli
- Build the App (Optional):
go build -o todo
Run the app using go run main.go
followed by a command.
go run main.go add "Buy groceries"
Output:
Task added: Buy groceries
go run main.go list
Output:
Task List:
1. [❌] Buy groceries
go run main.go done 1
Output:
Task 1 marked as done: Buy groceries
go run main.go list
Output:
Task List:
1. [✅] Buy groceries
- Tasks are stored in a
taskList.json
file in the project folder. - The app loads tasks from this file when it starts and saves updates automatically.
Example taskList.json
file:
[
{
"id": 1,
"content": "Buy groceries",
"done": true
}
]
├── main.go // Main program file
├── tasks.json // JSON file storing tasks
├── go.mod // Go module file
└── README.md // Project documentation
- 🗑️ Delete tasks by ID
- 🖊️ Edit task descriptions
- 📅 Set task deadlines
- 🔍 Filter tasks by status
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
. - Make your changes and commit:
git commit -m "Add new feature"
. - Push to your fork:
git push origin feature-branch
. - Open a pull request!
This project is licensed under the MIT License.
If you find this project helpful, please ⭐ star the repo and share it with others!
For questions or suggestions, reach out.
🎉 Happy coding! 🎉