Documentation
¶
Overview ¶
Package util provides general utility functions used throughout the TidyTask application .
These functions support the core functionality by handling shared concerns.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoTasks is a custom error for when the input task list is empty ErrNoTasks = errors.New("no tasks") )
Functions ¶
func ConfirmAction ¶
ConfirmAction prompts the user for a message and waits for yes/no confirmation it reads user input to stdin and returns true if the user responds with "y" or "yes" any other input is treated as a negative response
func FilterTasks ¶
func FilterTasks(tasks []task.Task, filterComplete bool, filterPriority bool, filterNotComplete bool, filterNotPriority bool) []task.Task
FilterTasks takes a slice of Task structs and returns a new slice only tasks that satisfy all enabled filters are added to the new slice
func PrintTasks ¶
PrintTasks takes a slice of Task structs and displays them as a colour coded table in the terminal
func VerifyDate ¶
VerifyDate checks if the input string is a valid date in DD-MM-YYYY format. returns an error if the format is invalid.
Types ¶
This section is empty.