format

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFormat           = "%!r⏱  %c%!g🍅\n%d\n%t"
	DefaultExclamationPoint = "❗️"
)

Variables

View Source
var FormatParts = map[string]Formatter{
	`%r`:  timeRemaining(false),
	`%!r`: timeRemaining(true),
	`%R`:  minutesRemaining(false),
	`%!R`: minutesRemaining(true),
	`%l`:  duration,
	`%L`:  durationMinutes,

	`%d`: description,
	`%t`: tags,

	`%c`:  goalComplete,
	`%g`:  goalTotal(false),
	`%!g`: goalTotal(true),
}

Functions

func DurationAsTime

func DurationAsTime(d time.Duration) string

DurationAsTime returns a duration string.

func Format

func Format(s *openpomodoro.State, f string) string

Types

type Formatter

type Formatter func(*openpomodoro.State) string

Jump to

Keyboard shortcuts

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