Documentation
¶
Overview ¶
Package todos stores session-scoped todo lists.
Index ¶
- Constants
- func Path(workspace string) string
- func RenderText(w io.Writer, report Report)
- func Save(workspace string, state State) error
- type Item
- type Report
- func Add(workspace string, content string, priority string) (Report, error)
- func Clear(workspace string) (Report, error)
- func List(workspace string) (Report, error)
- func Replace(workspace string, items []Item) (Report, error)
- func UpdateStatus(workspace string, id string, status string) (Report, error)
- type State
Constants ¶
View Source
const FileName = "todos.json"
Variables ¶
This section is empty.
Functions ¶
func RenderText ¶
Types ¶
type Item ¶
type Item struct {
ID string `json:"id"`
Content string `json:"content"`
ActiveForm string `json:"activeForm,omitempty"`
Status string `json:"status"`
Priority string `json:"priority"`
UpdatedAt time.Time `json:"updated_at"`
}
func NormalizeItems ¶
NormalizeItems applies stable defaults to todo items before validation, storage, or tool output.
Click to show internal directories.
Click to hide internal directories.