Documentation ¶
Index ¶
- func GetEnvOrDefault(names ...string) string
- func Interpolate(arg string, vars interface{}) string
- func InterpolateStrings(arg []string, vars interface{}) []string
- func NormalizeVersion(version string) string
- func RandomKey(length int) string
- func RandomString(length int) string
- func ShortTimestamp() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvOrDefault ¶
GetEnvOrDefault returns the first non-empty environment variable
func Interpolate ¶
Interpolate templatises the string using the vars as the context
func InterpolateStrings ¶
InterpolateStrings templatises each string in the slice using the vars as the context
func NormalizeVersion ¶ added in v1.1.1
NormalizeVersion appends "v" to version string if it's not exist
func RandomString ¶
RandomString returns a random string consisting of the characters in randomChars, with the length customized by the parameter
func ShortTimestamp ¶
func ShortTimestamp() string
ShortTimestamp returns a shortened timestamp using week of year + day of week to represent a day of the e.g. 1st of Jan on a Tuesday is 13
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.