luci: go.chromium.org/luci/common/data/text/units Index | Files

package units

import "go.chromium.org/luci/common/data/text/units"

Package units provides common useful printable units.

Index

Package Files

doc.go units.go

func SizeToString Uses

func SizeToString(s int64) string

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

type Size Uses

type Size int64

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

Size implements flag.Value interface.

func (*Size) Set Uses

func (s *Size) Set(str string) error

Set sets Size from a given flag args.

func (Size) String Uses

func (s Size) String() string

String returns pretty printed file size.

Package units imports 3 packages (graph) and is imported by 7 packages. Updated 2020-10-29. Refresh now. Tools for package owners.