todos

package
v0.0.0-...-93e5ea4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Todo

type Todo struct {
	ID        int
	Title     string
	Text      string
	State     string
	Startdate string
	Deadline  string
}

func (Todo) Edit

func (r Todo) Edit(field string, value string) (newTodo Todo, oldValue string, customError string)

type TodoArray

type TodoArray struct {
	Data     []Todo
	DataFile files.File
	Origin   string
}

func (*TodoArray) Add

func (r *TodoArray) Add(newTodo Todo)

func (*TodoArray) Clear

func (r *TodoArray) Clear()

func (*TodoArray) Delete

func (r *TodoArray) Delete(id []int) (found []bool, ids []int)

func (*TodoArray) Get

func (r *TodoArray) Get(type_ string)

func (*TodoArray) List

func (r *TodoArray) List(validateDate func(string) (bool, time.Duration, string))

List : refactor using function for `time left`

func (*TodoArray) Sort

func (r *TodoArray) Sort(field string, dateTimeFormat string) error

Jump to

Keyboard shortcuts

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