Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvOrDefault ¶ added in v0.2.0
EnvOrDefault returns the value of the environment variable identified by name parameter, or the value of the def parameter if the environment variable is missing.
Note: It will return an empty string if the environment variable is set to an empty string.
func EnvOrDefaultBool ¶ added in v0.2.1
EnvOrDefaultBool returns the value of the environment variable identified by name parameter cast to a boolean, or the value of the def parameter if the environment variable is missing or empty.
Note: It will return the value of def if the environment variable is set to an empty string.
func EnvOrDefaultInt32 ¶ added in v0.2.1
EnvOrDefaultInt32 returns the value of the environment variable identified by name parameter cast to a 32bit decimal integer, or the value of the def parameter if the environment variable is missing or empty.
Note: It will return the value of def if the environment variable is set to an empty string.
func EnvOrDefaultInt64 ¶ added in v0.2.1
EnvOrDefaultInt64 returns the value of the environment variable identified by name parameter cast to a 64bit decimal integer, or the value of the def parameter if the environment variable is missing or empty.
Note: It will return the value of def if the environment variable is set to an empty string.
func EnvOrDefaultStringSlice ¶ added in v0.3.0
EnvOrDefaultStringSlice returns the value of the environment variable identified by name parameter split by the value of the separator parameter as a slice of strings, or the value of the def parameter if the environment variable is missing.
Note: It will return an empty slice if the environment variable is set to an empty string.
Types ¶
type HttpError ¶
HttpError defines the generic structure of an HTTP error response.
func (*HttpError) Error ¶
Error will return the string representation of the HttpError.Message and Err, omitting the former if it is not set.
func (*HttpError) ErrorAndStack ¶
ErrorAndStack will return both the output of Error and StackTrace in one call
func (*HttpError) StackTrace ¶
StackTrace will return a string representation of Err's stack trace