util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmAction

func ConfirmAction(prompt string) bool

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

func PrintTasks(tasks []task.Task)

PrintTasks takes a slice of Task structs and displays them as a colour coded table in the terminal

func VerifyDate

func VerifyDate(date string) error

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.

Jump to

Keyboard shortcuts

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