utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2025 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PrintableStrLen = 2048
)

Variables

This section is empty.

Functions

func EnvOr

func EnvOr(key, def string) string

EnvOr if environment variable is not specified returns default value

func ExitConsolePrompt

func ExitConsolePrompt(c *console.Console) bool

ExitConsolePrompt asks operator to submit console exit

func GetAbsPath

func GetAbsPath(path string) (string, error)

GetAbsPath returns absolute path from relative path

func HumanDuration

func HumanDuration(t time.Time) string

HumanDuration returns string representation of specified time

func HumanDurationC

func HumanDurationC(t time.Time) string

HumanDurationC returns custom string representation of specified time

func IsStrPrintable

func IsStrPrintable(s string) bool

IsStrPrintable checks if string can be printed to console withour artifacts

Types

This section is empty.

Jump to

Keyboard shortcuts

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