helpers

package
v1.8.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2017 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ANSI_BOLD_BLACK   = "\033[30;1m"
	ANSI_BOLD_RED     = "\033[31;1m"
	ANSI_BOLD_GREEN   = "\033[32;1m"
	ANSI_BOLD_YELLOW  = "\033[33;1m"
	ANSI_BOLD_BLUE    = "\033[34;1m"
	ANSI_BOLD_MAGENTA = "\033[35;1m"
	ANSI_BOLD_CYAN    = "\033[36;1m"
	ANSI_BOLD_WHITE   = "\033[37;1m"
	ANSI_YELLOW       = "\033[0;33m"
	ANSI_RESET        = "\033[0;m"
	ANSI_CLEAR        = "\033[0K"
)
View Source
const (
	ACK           = 6
	TAB           = 9
	LF            = 10
	CR            = 13
	US            = 31
	SPACE         = 32
	AMPERSTAND    = 38
	SINGLE_QUOTE  = 39
	PLUS          = 43
	NINE          = 57
	QUESTION      = 63
	LOWERCASE_Z   = 90
	OPEN_BRACKET  = 91
	BACKSLASH     = 92
	UNDERSCORE    = 95
	CLOSE_BRACKET = 93
	BACKTICK      = 96
	TILDA         = 126
	DEL           = 127
)

Variables

This section is empty.

Functions

func ExecuteCommandSucceeded added in v1.6.0

func ExecuteCommandSucceeded(app ...string) (bool, error)

ExecuteCommandSucceeded tests whether a particular command execution successfully completes. If it does not, it returns the error produced.

func GetCurrentWorkingDirectory

func GetCurrentWorkingDirectory() string

func GetHomeDir

func GetHomeDir() string

func GetMapKey

func GetMapKey(value map[string]interface{}, keys ...string) (result interface{}, ok bool)

func KillProcessGroup

func KillProcessGroup(cmd *exec.Cmd)

func MakeFatalToPanic

func MakeFatalToPanic()

func SetProcessGroup

func SetProcessGroup(cmd *exec.Cmd)

func ShellEscape

func ShellEscape(str string) string

ShellEscape is taken from https://github.com/solidsnack/shell-escape/blob/master/Text/ShellEscape/Bash.hs

A Bash escaped string. The strings are wrapped in @$\'...\'@ if any bytes within them must be escaped; otherwise, they are left as is. Newlines and other control characters are represented as ANSI escape sequences. High bytes are represented as hex codes. Thus Bash escaped strings will always fit on one line and never contain non-ASCII bytes.

func ShortenToken

func ShortenToken(token string) string

func SkipIntegrationTests

func SkipIntegrationTests(t *testing.T, app ...string) bool

func ToBackslash

func ToBackslash(path string) string

func ToConfigMap

func ToConfigMap(list interface{}) (map[string]interface{}, bool)

func ToSlash

func ToSlash(path string) string

func ToTOML

func ToTOML(src interface{}) string

func ToYAML

func ToYAML(src interface{}) string

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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