var

command module
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

README

var

Tool to fill in json/yaml stdin stream from the environment variables.

Usage

Install: go get github.com/olebedev/var or download compiled binaries at releases page.

$ var --help
NAME:
   var - tool to fill in json/yaml stdin stream from the environment variables

USAGE:
   var [-a <FROM>=<TO> [-a <FROM>=<TO>]] < conf.yaml > env-conf.yaml

   The tool reads stdin, lookups env variables, sets them up and
   produce the result to stdout.

   All dotted("some.path.to.the.value") paths in the input file
   will be transformed to UPPERCASE and dot(".") will be replaced
   to underscore("_") to lookup the env.
   For example, env lookup for this input:

     {
       "port": 5000,
       "rabbitmq": {
         "url": "..."
       },
       "proxies": [
          "...",
            "..."
       ]
     }

   will be:

     port         -> PORT
     rabbitmq.url -> RABBITMQ_URL
     proxies      -> PROXIES_0, PROXIES_1


VERSION:
   0.1.1

AUTHOR(S):
   olebedev <ole6edev@gmail.com>

COMMANDS:
     help, h  Shows a list of commands or help for one command

GLOBAL OPTIONS:
   --alias value, -a value   alias to be matched: <FROM>=<TO>
   --indent value, -i value  indent string(only for json files)
   --help, -h                show help
   --version, -v             print the version
License

Apache 2.0 - http://www.apache.org/licenses/LICENSE-2.0

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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