Properties

Last built 1 week ago using go version go1.7.5 linux/amd64 and 36 seconds of time

Downloads
Filename
File Size
 
korvike_master_darwin-386.zip
1.2MiB
korvike_master_darwin-amd64.zip
1.3MiB
korvike_master_linux-386.zip
1.2MiB
korvike_master_linux-amd64.zip
1.3MiB
korvike_master_linux-arm.zip
1.2MiB
korvike_master_windows-386.zip
1.2MiB
korvike_master_windows-amd64.zip
1.3MiB
Project-Readme for this version

license Go Report Card

Luzifer / korvike

korvike is the finnish translation to the word “replacer” and that is what it does: It takes a Go template and executes it.

Available functions

  • {{ .<variable name> }}
    Take key-value pairs from the CLI and replace them inside the template
  # echo "{{ .foo }}" | korvike -v foo=bar
  bar
  • {{ env <variable name> [default value] }}
    Read environment variables and replace them inside the template
  # export FOO=bar
  # echo '{{env "FOO"}}' | korvike
  bar
  • {{ file <file name> [default value] }}
    Read a file and place it inside the template
  # echo "Hello World" > hello
  # echo '{{file "hello"}}' | korvike
  Hello World
  • {{ now <format string> }}
    Format the current date into the template (uses Go time format)
  # echo '{{now "2006-01-02 15:04:05"}}' | korvike
  2017-04-17 16:27:34

project status