Documentation
¶
Overview ¶
Package todo provides functionality for a simple CLI todo application.
Index ¶
- Constants
- func Blue(s string) string
- func Green(s string) string
- func Grey(s string) string
- func PrintBlue(w io.Writer, s string)
- func PrintGreen(w io.Writer, s string)
- func PrintGrey(w io.Writer, s string)
- func PrintRed(w io.Writer, s string)
- func PrintRedStderr(s string)
- func Red(s string) string
- type Item
- type Todos
- func (t *Todos) Add(task string)
- func (t *Todos) Complete(index int) error
- func (t *Todos) Delete(index int) error
- func (t *Todos) DeleteAll() error
- func (t *Todos) Edit(index int, newTask string) error
- func (t *Todos) Load(filename string) error
- func (t Todos) Print()
- func (t Todos) PrintCompleted()
- func (t Todos) PrintPending()
- func (t *Todos) Store(filename string) error
Constants ¶
View Source
const ( ColorDefault = "\x1b[39m" ColorRed = "\x1b[91m" ColorGreen = "\x1b[32m" ColorBlue = "\x1b[94m" ColorGrey = "\x1b[90m" )
Variables ¶
This section is empty.
Functions ¶
func PrintGreen ¶
Types ¶
type Todos ¶
type Todos []Item
Todos is a collection of todo items.
func (Todos) PrintCompleted ¶
func (t Todos) PrintCompleted()
PrintCompleted prints only the completed todo items to the console.
func (Todos) PrintPending ¶
func (t Todos) PrintPending()
PrintPending prints only the pending todo items to the console.
Click to show internal directories.
Click to hide internal directories.
