rise

command module
Version: v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2019 License: MIT Imports: 3 Imported by: 0

README

Build Status Go Report Card GoDoc Coverage Status

rise

Powerful text interpolation. Documentation can be found here.

Note: rise is still in development and is subject to breaking changes until we reach our first major release.

Installation

Binaries

You can find binaries for the latest release on the releases page.

Go toolchain
$ go get -u github.com/openpixel/rise

Quickstart

CLI

You can see the usage documentation for the CLI by running rise --help.

$ rise --help
A powerful text interpolation tool.

Usage:
  rise [flags]
  rise [command]

Available Commands:
  help      Help about any command
  version   Print the version number of rise

Flags:
  -c, --config stringSlice    The files that define the configuration to use for interpolation
  -h, --help                  help for rise
  -i, --input string          The file to perform interpolation on
  -o, --output string         The file to output
Config Files

The config files should be in hcl compatible formats. See https://github.com/hashicorp/hcl for reference. Rise loads the files using FIFO, meaning the last file to reference a key will take precedence. For example, if we had two files that looked like this:

vars.hcl

variable "i" {
  value = 6
}

vars2.hcl

variable "i" {
  value = 10
}

And ran the following command

$ rise ... --config vars.hcl --config vars2.hcl

The value of i would be 10.

Examples

Look in the examples directory for an example, including inheritance:

$ rise -i ./examples/input.json -o ./examples/output.json --config ./examples/vars.hcl --config ./examples/vars2.hcl

Coming Soon

  • More interpolation methods
  • Deeper documentation with examples for interpolation methods
  • More configuration CLI arguments
    • Support for directories as inputs/outputs
    • Support for globs (eg: /tmp/*.json)

Inspiration

  • hashicorp/hil - Used to perform interpolation
  • hashicorp/hcl - Used as a configuration syntax for variables
  • hashicorp/terraform - Inspiration for the tool. A number of the interpolation functions have been extracted directly from terraform.

Documentation

The Go Gopher

There is no documentation for this package.

Source Files

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL