util

package
v0.0.0-...-5f29aa1 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src string, dst string) error

CopyDir copies src directory to dst.

func CopyFile

func CopyFile(src string, dst string) error

CopyFile copies src file to dst.

func ExpandUser

func ExpandUser(path string) (string, error)

ExpandUser expands the path to user's home directory when path begins with '~'.

func PrintError

func PrintError(msg string)

PrintError formats and prints the provided string for error messages.

func PrintErrorAndExit

func PrintErrorAndExit(msg string, exitCodeOptional ...int)

PrintErrorAndExit prints the error message and os.Exits with the optionally provided error code.

func RunCmd

func RunCmd(debug bool, name string, args ...string) error

RunCmd execute the provided command with args. Yeah, yeah, yeah, I know I cheated by using Exec in this package.

Types

This section is empty.

Jump to

Keyboard shortcuts

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