Documentation
¶
Index ¶
- func Contains(s []string, e string) bool
- func ExpandPath(path string) (string, error)
- func GetEnvVar(env *object.Environment, varName, defaultVal string) string
- func InterpolateStringVars(str string, env *object.Environment) string
- func IsNumber(s string) bool
- func Mapify(list []object.Object) map[string]object.Object
- func UnaliasPath(path string, packageAlias map[string]string) string
- func UniqueStrings(slice []string) []string
- func UpdateAvailable(version string) (string, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExpandPath ¶
ExpandPath (path) resolves leading "~/" to user's HomeDir returns expanded path, error
func GetEnvVar ¶
func GetEnvVar(env *object.Environment, varName, defaultVal string) string
GetEnvVar (varName, defaultVal) Return the varName value from the ABS env, or OS env, or default value in that order
func InterpolateStringVars ¶
func InterpolateStringVars(str string, env *object.Environment) string
InterpolateStringVars (str, env) return input string with $vars interpolated from environment
func Mapify ¶
Mapify converts a list of objects to a map. This is useful when you want to test whether elements of a list are present in another list: You can mapify the first one and check whether elements of the second one would occupy the same key in the map.
func UnaliasPath ¶
UnaliasPath translates a path alias to the full path in the filesystem.
func UniqueStrings ¶
UniqueStrings takes an input list of strings and returns a version without duplicate values
func UpdateAvailable ¶
Returns latest version, plus "new version available?" bool
Types ¶
This section is empty.