util

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2024 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "0.2.2"

Variables

View Source
var (
	ConfigPath string
)
View Source
var (
	UsedPath string
)

Functions

func AddToPath

func AddToPath(pathToAdd string)

func BinName

func BinName() string

func Download

func Download(url string, dest string) error

func Find

func Find(name string, in string) (string, error)

Find finds a file in a directory

func GetGlobalConfigPath

func GetGlobalConfigPath() (string, error)

func GetPackagePath

func GetPackagePath() string

func IsInDir added in v0.1.1

func IsInDir(p string, dir string) bool

func PopenArgs added in v0.2.0

func PopenArgs(arg string) (string, []string)

func PushEnv added in v0.1.1

func PushEnv(key string, pathToAdd string)

func RestoreEnv added in v0.1.1

func RestoreEnv()

func SetEnv added in v0.1.1

func SetEnv(key string, value string)

func Spin

func Spin() func()

spin shows a spinner on the terminal and returns a function to stop it

func System

func System(cmdStr string) *exec.Cmd

func TermWidth

func TermWidth() int

func Unzip

func Unzip(p string) error

Unzip unzips an archive at its location

Types

This section is empty.

Jump to

Keyboard shortcuts

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