util

package
v0.0.0-...-4b650bf Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Rc = "\033[0m"
	By = "\033[1m\033[33m"
	Bg = "\033[1m\033[32m"
)

Define some colors.

Functions

func CheckRoot

func CheckRoot(message string)

CheckRoot checks if the user is root.

func Copy

func Copy(src, dst string, overwrite bool) error

Copy copies a file (src) to a new one (dst).

func Display

func Display(out io.Writer, doLog bool, format string, toDisplay ...any)

Display is wrapper over fmt.Fprintf.

func Download

func Download(dest, url string) error

Download downloads a body from a url and writes to dest.

func Untar

func Untar(destDir, archive string) (string, error)

Untar untars a tar.gz tarball.

func Verify

func Verify(fileToVerify, supposedHash string) (bool, error)

Verify verifies the sha512 hash of a file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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