gutils

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 License: MIT Imports: 17 Imported by: 3

Documentation

Index

Constants

View Source
const (
	Win     string = "win"
	Zsh     string = "zsh"
	Bash    string = "bash"
	Windows string = "windows"
	Darwin  string = "darwin"
	Linux   string = "linux"
)

Variables

This section is empty.

Functions

func CheckSum added in v0.2.0

func CheckSum(fpath, cType, cSum string) (r bool)

func Closeq

func Closeq(v any)

func ComputeSum added in v0.2.0

func ComputeSum(fpath, sumType string) (sumStr string)

func CopyFile added in v0.2.0

func CopyFile(src, dst string) (written int64, err error)

func ExecuteSysCommand added in v0.2.6

func ExecuteSysCommand(collectOutput bool, workDir string, args ...string) (*bytes.Buffer, error)

func FlushPathEnvForUnix added in v0.2.6

func FlushPathEnvForUnix() (err error)

func GetHomeDir added in v0.2.6

func GetHomeDir() string

func GetShell added in v0.2.6

func GetShell() (shell string)

func GetShellRcFile added in v0.2.6

func GetShellRcFile() (rc string)

func MakeDirs

func MakeDirs(dirs ...string)

func PathIsExist

func PathIsExist(path string) (bool, error)

func VerifyUrls added in v0.2.1

func VerifyUrls(rawUrl string) (r bool)

Types

type CtrlCSignal added in v0.1.7

type CtrlCSignal struct {
	Sweeper func() error
}

Listen Signal: Ctrl+C

func (*CtrlCSignal) ListenSignal added in v0.1.7

func (that *CtrlCSignal) ListenSignal()

func (*CtrlCSignal) RegisterSweeper added in v0.2.6

func (that *CtrlCSignal) RegisterSweeper(f func() error)

Jump to

Keyboard shortcuts

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