utils

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractByKey

func ExtractByKey(data []byte, key string, fun func(string)) error

func FormatDuration

func FormatDuration(seconds int) string

func IBytes

func IBytes(s uint64) string

IBytes produces a human readable representation of an IEC size.

IBytes(82854982) -> 79 MiB

func IsWritableDir

func IsWritableDir(path string) (err error)

func MustExpand

func MustExpand(path string) string

func ParseISO8601

func ParseISO8601(s string) (time.Duration, error)

func RemoveDirs

func RemoveDirs(root string) error

func SleepContext

func SleepContext(ctx context.Context, d time.Duration)

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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