Back to

Package units

Latest Go to latest

The latest major version is .

Published: Aug 1, 2020 | License: Apache-2.0 | Module:


Package units provides common useful printable units.


func Round

func Round(value time.Duration, resolution time.Duration) time.Duration

Round rounds a time.Duration at round.

func SizeToString

func SizeToString(s int64) string

SizeToString pretty prints file size (given as number of bytes).

type Size

type Size int64

Size represents a size in bytes that knows how to print itself.

func (Size) String

func (s Size) String() string

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier