Documentation
¶
Index ¶
- func Capitalize(s string) string
- func ContainsString(s []string, v string) bool
- func ReadEnvBool(key string) bool
- func ReadEnvInt(key string) int
- func ReadEnvString(key string) string
- func ReadEnvStringArray(key string) []string
- func ReadEnvTime(key string) time.Duration
- func RemoveEmptyStrings(s []string) []string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Capitalize ¶
Capitalize returns a capitalized version of a string
func ContainsString ¶
ContainsString checks if `v` is present on slice `s`
func ReadEnvBool ¶
ReadEnvBool read and parse boolean environment variables. Will return `false` if the variable is not a `bool`
func ReadEnvInt ¶
ReadEnvInt read an integer environment variables. Will return `0` if the variable is not an `int`
func ReadEnvString ¶
ReadEnvString read string environment variables. This function is a wrapper function to 'os.Getenv()'
func ReadEnvStringArray ¶ added in v0.9.0
ReadEnvStringArray read an array of string environment variables. Must be comma-separated Automatically trims all values
func ReadEnvTime ¶ added in v0.16.0
ReadEnvTime read and try to parse time duration from environment variables. If the value is parsable as an integer, it will use seconds as unit.
func RemoveEmptyStrings ¶
RemoveEmptyStrings remove empty strings from a slice
Types ¶
This section is empty.