Documentation
¶
Overview ¶
Package task provides error constructors for task file operations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FileNotFound ¶
func FileNotFound() error
FileNotFound returns an error when TASKS.md does not exist.
Returns:
- error: "TASKS.md not found"
func FileRead ¶
FileRead wraps a failure to read TASKS.md.
Parameters:
- cause: the underlying read error
Returns:
- error: "failed to read TASKS.md: <cause>"
func FileWrite ¶
FileWrite wraps a failure to write TASKS.md.
Parameters:
- cause: the underlying write error
Returns:
- error: "failed to write TASKS.md: <cause>"
func MultipleMatches ¶
MultipleMatches returns an error when a query matches more than one task.
Parameters:
- query: the search string that matched multiple tasks
Returns:
- error: "multiple tasks match <query>; be more specific or use task number"
func NoMatch ¶
NoMatch returns an error when no task matches the search query.
Parameters:
- query: the search string that matched nothing.
Returns:
- error: "no task matching \"<query>\" found"
func NoneCompleted ¶
func NoneCompleted() error
NoneCompleted returns an error when there are no completed tasks to archive.
Returns:
- error: "no completed tasks to archive"
func NoneSpecified ¶
func NoneSpecified() error
NoneSpecified returns an error when no task query was provided.
Returns:
- error: "no task specified"
func NotFound ¶
NotFound returns an error when no task matches the query.
Parameters:
- query: the search string that matched nothing
Returns:
- error: "no task matching <query> found"
func SnapshotWrite ¶
SnapshotWrite wraps a failure to write a task snapshot file.
Parameters:
- cause: the underlying OS error.
Returns:
- error: "failed to write snapshot: <cause>"
Types ¶
This section is empty.