From fb20d34f891525f60cdb2ba6ee1b29ebcec4bc1f Mon Sep 17 00:00:00 2001 From: jack Date: Tue, 4 Oct 2022 18:01:02 +0700 Subject: [PATCH 1/2] fix: Update README.md --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6914c14..207b67b 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,15 @@ Command line tool that compiles Golang [templates](http://golang.org/pkg/text/template/) with values from YAML files. -Inspired by Python/Jinja2's [j2cli](https://github.com/kolypto/j2cli). +## Install global CLI -## Install - - go get github.com/tsg/gotpl +```shell +go install github.com/huantt/gotpl@latest +``` +```shell +export PATH=$PATH:$(go env GOPATH)/bin +``` ## Usage Say you have a `template` file like this: From 0e4b36120721225f5895f4ffc63e19a4aef69a51 Mon Sep 17 00:00:00 2001 From: jack Date: Fri, 14 Oct 2022 10:05:06 +0700 Subject: [PATCH 2/2] chore: Update README.md --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 207b67b..fa4d8de 100644 --- a/README.md +++ b/README.md @@ -27,3 +27,14 @@ and a `user.yml` YAML file like this one: You can compile the template like this: gotpl template < user.yml + +Or +```shell +cat user.yaml | gotpl template +``` + +Use multiple value files +```shell +cat values-1.yaml values-2.yaml | gotpl template +# Note that end of value-1.yaml must be new line to separate with value-2.yaml +``` \ No newline at end of file