apmconfig

package
v0.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 5, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseBoolEnv

func ParseBoolEnv(envKey string, defaultValue bool) (bool, error)

ParseBoolEnv gets the value of the environment variable envKey and, if set, parses it as a boolean. If the environment variable is unset, defaultValue is returned.

func ParseDuration

func ParseDuration(value, defaultSuffix string) (time.Duration, error)

ParseDuration parses value as a duration, appending defaultSuffix if value does not have one.

func ParseDurationEnv

func ParseDurationEnv(envKey, defaultSuffix string, defaultDuration time.Duration) (time.Duration, error)

ParseDurationEnv gets the value of the environment variable envKey and, if set, parses it as a duration. If the value has no suffix, defaultSuffix is appended. If the environment variable is unset, defaultDuration is returned.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL