format

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2026 License: BSD-3-Clause Imports: 10 Imported by: 0

Documentation

Overview

Package format provides output formatters for task data.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Formatter

type Formatter interface {
	Task(w io.Writer, task *taskkit.Task) error
	Tasks(w io.Writer, tasks []*taskkit.Task) error
	ProjectSummaries(w io.Writer, summaries []*taskkit.ProjectSummary) error
	UrgencyBreakdown(w io.Writer, task *taskkit.Task) error
}

Formatter writes task output to a writer.

func NewFormatter

func NewFormatter(f string, columns []string) (Formatter, error)

NewFormatter returns the Formatter for the given format string and optional column list (used by the pretty formatter; ignored by json).

func NewFormatterFromCmd

func NewFormatterFromCmd(cmd *cobra.Command) (Formatter, error)

NewFormatterFromCmd returns the Formatter based on the --output flag value. If --columns is registered on the command, its value is forwarded to the formatter.

Jump to

Keyboard shortcuts

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