unit

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const Day = 24 * time.Hour

Day is 24 hours.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

type Bytes int64

Bytes represents the size in bytes.

func (Bytes) String

func (b Bytes) String() string

String implements fmt.Stringer.

func (*Bytes) UnmarshalText

func (b *Bytes) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

It is needed for Kong: https://pkg.go.dev/github.com/alecthomas/kong#readme-custom-decoders-mappers

type Duration

type Duration time.Duration

Duration is a wrapper around time.Duration that supports parsing days.

func (Duration) String

func (d Duration) String() string

String implements fmt.Stringer.

func (*Duration) UnmarshalText

func (d *Duration) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

It is needed for Kong: https://pkg.go.dev/github.com/alecthomas/kong#readme-custom-decoders-mappers

Jump to

Keyboard shortcuts

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