Documentation ¶
Overview ¶
Package envsvc provides convenience methods for using env with services.
It exposes these variables via HTTP at /debug/env in JSON format.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Handler ¶
Handler returns the env HTTP Handler.
This is only needed to install the handler in a non-standard location.
func ParseWithExitFn ¶ added in v0.2.0
func ParseWithExitFn(exitFn func(int))
ParseWithExitFn registers command line arguments -env-check, -env-dump, -env-dump-yaml and calls env.Parse(). Any errors are written to stderr and then exitFn(1) is called.
Registered flags: -env-dump: skips parsing step and writes each env.Var to stderr, calls exitFn(0) when done. -env-dump-yaml: skips parsing steps and write each env.Var to stderr in YAML format, calls os.Exit(0) when done. -env-check: calls exitFn(0) if env.Parse() succeeds without error.
Types ¶
This section is empty.