todo

package module
v0.0.0-...-5c2bd13 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2020 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add

func Add(message string) string

Add will add a new todo based on a message

func Complete

func Complete(id string) error

Complete will set the complete boolean to true, marking a todo as completed

func Delete

func Delete(id string) error

Delete will remove a Todo from the Todo list

Types

type Todo

type Todo struct {
	ID       string `json:"id"`
	Message  string `json:"message"`
	Complete bool   `json:"complete"`
}

Todo data structure for a task with a description of what to do

func Get

func Get() []Todo

Get retrieves all elements from the todo list

Jump to

Keyboard shortcuts

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