utils

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CleanBackupNameRE = regexp.MustCompile(`[\t\r\n ]+|\.{2,}|[\\/]+`)

Functions

func ExecCmd

func ExecCmd(ctx context.Context, timeout time.Duration, cmd string, args ...string) error

func ExecCmdOut

func ExecCmdOut(ctx context.Context, timeout time.Duration, cmd string, args ...string) (string, error)

func FormatBytes

func FormatBytes(i uint64) string

FormatBytes - Convert bytes to human-readable string

func HumanizeDuration

func HumanizeDuration(d time.Duration) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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