cmd

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Copyright © 2024 NAME HERE <EMAIL ADDRESS>

Copyright © 2024 NAME HERE <EMAIL ADDRESS>

Copyright © 2024 NAME HERE <EMAIL ADDRESS>

Copyright © 2024 mosheto <msalshakhatreh@gmail.com>

Copyright © 2024 NAME HERE <EMAIL ADDRESS>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

Types

type StatusType

type StatusType string
const (
	NotStarted StatusType = "NotStarted"
	InProgress StatusType = "InProgress"
	Done       StatusType = "Done"
)

type Task

type Task struct {
	Title       string       `json:"title"`
	Updates     []TaskUpdate `json:"updates"`
	Status      StatusType   `json:"status"`
	CompletedAt time.Time    `json:"completedAt"`
}

type TaskList

type TaskList []Task

func (*TaskList) Add

func (tasks *TaskList) Add(title string)

func (*TaskList) AddTask added in v0.0.3

func (tasks *TaskList) AddTask(task Task)

func (*TaskList) ChangeStatus

func (tasks *TaskList) ChangeStatus(id int, status StatusType)

func (*TaskList) Get

func (tasks *TaskList) Get(id int) *Task

func (*TaskList) List

func (tasks *TaskList) List()

func (*TaskList) Load

func (tasks *TaskList) Load(filename string) error

func (*TaskList) Store

func (tasks *TaskList) Store(filename string) error

func (*TaskList) Update

func (tasks *TaskList) Update(id int, update string)

type TaskUpdate

type TaskUpdate struct {
	Description string    `json:"description"`
	WrittenAt   time.Time `json:"writtenAt"`
}

Jump to

Keyboard shortcuts

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