display

package
v0.1.14 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2024 License: MIT Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ApproximateHoursPerDay   = 24
	ApproximateHoursPerWeek  = ApproximateHoursPerDay * 7
	ApproximateHoursPerMonth = ApproximateHoursPerDay * 30
	ApproximateHoursPerYear  = ApproximateHoursPerDay * 365
)

Its not important to be exact, approximations are good enough.

Variables

This section is empty.

Functions

This section is empty.

Types

type Column

type Column struct {
	Header string
	Width  int
	Data   []string
}

type Duration

type Duration struct {
	Minutes int64
	Hours   int64
	Days    int64
	Weeks   int64
	Months  int64
	Years   int64
}

func NewDuration

func NewDuration(d time.Duration) Duration

func (Duration) Round

func (d Duration) Round() Duration

Round returns a new duration rounded the duration to the highest non-zero field.

func (Duration) String

func (d Duration) String() string

StringifyDuration returns a human readable string of the duration.

type Table

type Table []Column

func NewTable

func NewTable(headers ...string) Table

func (Table) AddRow

func (t Table) AddRow(data ...string) error

func (Table) String

func (t Table) String() string

Jump to

Keyboard shortcuts

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