utils

package
v0.0.0-...-d67b09b Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Byte = "b"
	KB   = "k"
	MB   = "m"
	GB   = "g"

	Units = Byte + KB + MB + GB
)

Variables

View Source
var (
	ErrInvalidFormat = errors.New("invalid format")
	ErrInvalidUnit   = errors.New("invalid unit")
)

Functions

func ID

func ID() string

func ParseDuration

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

func PathExists

func PathExists(path string) bool

func ToBytes

func ToBytes(str string) (int64, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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