units

package
Version: v0.0.0-...-51f9457 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

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

Jump to

Keyboard shortcuts

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