configenv

package
v0.1.20 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: MPL-2.0 Imports: 8 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