Skip to content

Commit

Permalink
adding support for "--version"
Browse files Browse the repository at this point in the history
  • Loading branch information
ninlil committed Apr 27, 2022
1 parent 61018b1 commit 8b062eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ tmpl8 [--input INPUT] [--output FILE] [--verbose] [--trace] [--raw] [--split] [-
| `-o` / `--output` | Set output filename (instead of using `>`) |
| `-r` / `--raw` | Don't ensure each template ends with a newline (not recommended for YAML output)|
| `-s` / `--split` | Split JSON input objects arrays to multiple objects parsed each (similar to YAMLs with `---` separators) |
| `--version` | Display current version |

## define/block support
Any `define`/`block` helpers are useable in templates in all following template sources (and can be overridden)
Expand Down
4 changes: 4 additions & 0 deletions args.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ type arguments struct {
NoInput bool `arg:"-z" help:"no input (equals -i '?{}')"`
}

func (arguments) Version() string {
return "v0.2.1"
}

func (arguments) Description() string {
return `tmpl8 - Generic (and Kubernetes-friendly) Templating Engine using the go text/template and Sprig functions
Expand Down

0 comments on commit 8b062eb

Please sign in to comment.