util

package
v0.0.0-...-3a67d40 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2018 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Debug = false
	Quiet = false
)

Functions

func Contains

func Contains(strs []string, target string) bool

func ExecCommand

func ExecCommand(command ...string) (string, error)

func Exists

func Exists(path string) bool

func ExpandPath

func ExpandPath(pa string) string

func FormatErrorAtLine

func FormatErrorAtLine(file string, line int, message string) string

func GetAllDir

func GetAllDir(dir string) []string

func GetCurrentPath

func GetCurrentPath() string

func GetHomeDir

func GetHomeDir() string

func PrepareDir

func PrepareDir(dir string)

func Print

func Print(str string)

func PrintArgumentError

func PrintArgumentError(num int)

func PrintArgumentMoreError

func PrintArgumentMoreError(num int)

func PrintDebug

func PrintDebug(str string)

func PrintErrorMessage

func PrintErrorMessage(err string)

func PrintErrorMessageContinue

func PrintErrorMessageContinue(err string)

func PrintErrors

func PrintErrors(errs ...error)

func PrintErrorsContinue

func PrintErrorsContinue(errs ...error) bool

func ReadFile

func ReadFile(name string) []string

func Remove

func Remove(strs []string, target string) []string

func RemoveDir

func RemoveDir(name string)

func Setenv

func Setenv(key, value string)

func Wrap

func Wrap(strs []string) [][]string

func WriteFile

func WriteFile(name string, data []string)

func YNPrompt

func YNPrompt(prompt string, yes bool) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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