helper

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckMark

func CheckMark() func()

CheckMark will only print the check mark for progress bar

func CheckUID

func CheckUID(u int, g int) (uid, gid uint32)

checkUID will check the int to see if a value is provided via flags and convert it to uint32 and returns the values

func IsPathValid added in v0.1.4

func IsPathValid(path string) (bool, error)

IsPathValid checks if a file or directory exists at the given path. It returns true if the path exists, false if it doesn't exist, and an error if any issue occurs during the check.

func ProgressBar

func ProgressBar(size int64, truncatedFilePath string, onCompletionFunc func()) *progressbar.ProgressBar

ProgressBar function will return *progressbar.ProgressBar with given inputs

func TrimSHA added in v0.1.4

func TrimSHA(commitSHA string) string

TrimSAH will check the commit and if its not empty trim.

func TruncateFileName

func TruncateFileName(srcFilePath string) string

TruncateFileName will turncate filename for progresbar if its longer then 20 chars

Types

This section is empty.

Jump to

Keyboard shortcuts

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