godo

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteArchiveFile

func WriteArchiveFile(fileName string, todoItems []TodoItem) error

func WriteTodoFile

func WriteTodoFile(fileName string, todoItems []TodoItem) error

Types

type Application

type Application struct {
	Config *Config
	View   *tview.Application
}

func NewApplication

func NewApplication(config Config) Application

func (Application) Run

func (app Application) Run()

type Config

type Config struct {
	TodoFile         string
	EnableArchive    bool
	ArchiveDirectory string
	ArchiveFormat    string
}

func NewConfig

func NewConfig() *Config

type ItemStore

type ItemStore struct {
	Config *Config
	// contains filtered or unexported fields
}

func NewItemStore

func NewItemStore(config Config) ItemStore

func (*ItemStore) AddItem

func (itemStore *ItemStore) AddItem(item TodoItem)

func (*ItemStore) ArchiveItem

func (itemStore *ItemStore) ArchiveItem(s int)

func (*ItemStore) RemoveItem

func (itemStore *ItemStore) RemoveItem(s int)

type TodoItem

type TodoItem struct {
	Complete       bool
	Priority       string
	CompletionDate time.Time
	CreationDate   time.Time
	Description    string
}

func NewTodoItem

func NewTodoItem(line string) TodoItem

func ReadTodoFile

func ReadTodoFile(fileName string) ([]TodoItem, error)

func (TodoItem) String

func (item TodoItem) String() string

Jump to

Keyboard shortcuts

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