Skip to content

S1933/todo_go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Go TODO Application

A simple command-line TODO application written in Go that allows you to manage your tasks efficiently.

Features

  • 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

Installation

Prerequisites

  • Go 1.13 or higher

Steps

  1. Clone this repository:

    git clone https://github.com/yourusername/go-todo-app.git
    cd go-todo-app
    
  2. Build the application:

    go build -o todo
    
  3. Run the application:

    ./todo
    

    Or simply use:

    go run main.go
    

Usage

The application provides a simple menu-driven interface:

  1. Display all todos - Shows all your current tasks
  2. Add a new todo - Create a new task
  3. Edit a todo - Modify an existing task
  4. Toggle todo completion - Mark a task as completed or incomplete
  5. Delete a todo - Remove a task (with confirmation)
  6. Exit - Close the application

Data Storage

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.

Todo Structure

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

Example

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages