du

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2025 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package du provides disk usage measurement representation. It defines a Size type (uint64) that can be converted to and from human-readable strings with units (K, M, G, etc.).

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrSizeSyntax = errors.New("bad size syntax")
)

Functions

This section is empty.

Types

type Size

type Size uint64
const (
	B Size = 1 << (10 * iota)
	K
	M
	G
	T
	P
	E
)

func ParseSize

func ParseSize(s string) (Size, error)

func (Size) Int

func (s Size) Int() int

func (Size) String

func (s Size) String() string

Jump to

Keyboard shortcuts

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