units

package
v0.0.0-...-e834411 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 3 Imported by: 13

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.

Jump to

Keyboard shortcuts

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