configenv

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2017 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package configenv implements a TransformationProvider that replaces objects on the form: {$env: "VAR"} with the value of the environment variable VAR.

An additional key 'type' may be given as {$env: "VAR", type: "TYPE"}, which determines how the environment variable value should be parsed. By default the TYPE is 'string', but the following types are supported:

  • string, value is return as string (default),
  • number, value is parsed a number,
  • json, value is parsed as JSON,
  • bool, value becomes true if it matches 'true' (case insensitive), and,
  • list, value is parsed as space separated list of strings.

Jump to

Keyboard shortcuts

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