utils

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateLayout = "2006-01-02 15:04:05.999999999"
)

Variables

This section is empty.

Functions

func CleanPath added in v1.1.1

func CleanPath(fp string) string

func DeleteAllImages added in v1.1.1

func DeleteAllImages(imgDir string) error

func DeleteImage added in v1.1.1

func DeleteImage(imagePath string) error

func DiskspaceAvailable added in v1.1.1

func DiskspaceAvailable(bytes int) bool

func ExpandHome added in v0.0.7

func ExpandHome(relPath string) string

Expands the path to include the home directory if the path is prefixed with `~`. If it isn't prefixed with `~`, the path is returned as-is.

func ExpandRel added in v0.0.7

func ExpandRel(relPath, absPath string) string

func GetImgIdentifier added in v1.0.3

func GetImgIdentifier(filename string) string

func GetStdin

func GetStdin() string

func GetTime

func GetTime() string

func GetTimeStamp added in v1.0.3

func GetTimeStamp() string

func HandleError

func HandleError(err error)

func IsInt added in v0.0.7

func IsInt(arg string) bool

func LogERROR added in v0.1.0

func LogERROR(message string)

func LogINFO added in v0.1.0

func LogINFO(message string)

func LogWARN added in v0.1.0

func LogWARN(message string)

func ParseDuration added in v1.1.1

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

func SanitizeChars added in v1.2.1

func SanitizeChars(s string) string

func SetUpLogger added in v0.1.0

func SetUpLogger(logFilePath string)

func Shorten

func Shorten(s string, maxChar int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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