Documentation

Overview

Package units provides common useful printable units.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SizeToString

func SizeToString(s int64) string

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

Types

type Size

type Size int64

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

Size implements flag.Value interface.

func (*Size) Set

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

Set sets Size from a given flag args.

func (Size) String

func (s Size) String() string

String returns pretty printed file size.

Source Files