format

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2023 License: Apache-2.0 Imports: 2 Imported by: 13

Documentation

Overview

Package format provides the means to format types into human readable strings.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(bytes uint64) string

Bytes will return a string with the bytes formatted as the largest possible unit to two decimal places.

Note: This function returns formatted bytes as binary bytes so iB (multiple of 1024) and the largest unit is EiB.

func Duration

func Duration(d time.Duration) string

Duration truncate the provided duration to a sensible precision and return it formatted as a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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