Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get ¶
Get returns the value of the environment variable `key` if set. If not set, and `key + "_FILE"` is set, the file at that path is read and its trimmed contents are returned. If neither are set, def is returned.
func GetBool ¶
GetBool returns the boolean value of the environment variable `key`. Recognised true values are: 1, t, true, y, yes (case-insensitive). Recognised false values are: 0, f, false, n, no.
func GetConversionOutputFormat ¶ added in v1.7.0
func GetConversionOutputFormat() string
GetConversionOutputFormat returns the preferred output format (pdf or epub). It checks for CONVERSION_OUTPUT_FORMAT environment variable and validates the value. Valid values are "pdf" and "epub" (case-insensitive). Defaults to "epub" if unset or invalid.
func GetDuration ¶ added in v1.4.1
GetDuration returns the duration value of the environment variable `key`. It uses ParseDuration and falls back to def if parsing fails or the variable is unset.
Types ¶
This section is empty.