models

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DisplayTodos

func DisplayTodos(todos *[]Todo)

/ Displays a todo item in a neatly formatted manner

Types

type Todo

type Todo struct {
	ID          int
	Description string
	Completed   bool
	DateCreated time.Time
	DueDate     time.Time
}

func DeserializeTodo

func DeserializeTodo(data []string) (*Todo, error)

Deserialize a todo from its string representation the [data] must contain 5 items

func NewTodoItem

func NewTodoItem(id int, descr string) Todo

/ Creates a new todo item

func (*Todo) SerializeTodo

func (t *Todo) SerializeTodo() []string

Serializes a todo into an slice of strings suitable for storing in a CSV

Jump to

Keyboard shortcuts

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