td

package module
v0.0.0-...-781ee16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

README

td

Command line todo application for Delete, Create, Update, Get and Save todos in JSON format.

bear

Usage

./td tool, Developed for MHM
Copyright 2024
Usage information:
  -add
        Add new task to todo list
  -all
        List all tasks
  -complete int
        Item to be completed
  -del int
        Deleting a task from list
  -list
        List uncompleted tasks
  -task string
        Task to be included i the toDo list
  -uncomplete int
        Uncomplete a completed task

Author

Ali Ahmadi (2024)

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []item

List represents all todos in application

func (*List) Add

func (l *List) Add(task string)

Add creates a new task and add that to list

func (*List) Complete

func (l *List) Complete(index int) error

Complete makes a todo complete by change Done from false to true

func (*List) Delete

func (l *List) Delete(index int) error

Delete method deletes a todo from list by its index

func (*List) Format

func (l *List) Format() string

func (*List) Get

func (l *List) Get(file string) error

Get reads specified file and unmarshal its to a list of items

func (*List) Save

func (l *List) Save(file string) error

Save converts list of items to a json and write them in input file

func (*List) String

func (l *List) String() string

String returns formatted list

func (*List) Uncomplete

func (l *List) Uncomplete(index int) error

Uncomplete a completed todo

Directories

Path Synopsis
cmd
todo command

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL