From 63915331c4997e676a7e4894998a322001825b0f Mon Sep 17 00:00:00 2001 From: thomas Date: Wed, 18 Jan 2023 01:28:06 -0500 Subject: [PATCH] add version to help text --- help.go | 8 +++++--- timplit.go | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/help.go b/help.go index 4ec37aa..9d222b6 100644 --- a/help.go +++ b/help.go @@ -5,8 +5,9 @@ import ( "os" ) -var usage = ` -timplit is a dirt simple CLI for golang templates +var usage = `timplit %s + +A dirt simple CLI for golang templates USAGE @@ -46,8 +47,9 @@ CAVEATS Will be interpreted by the template as: {"items": [1, 2, 3]} + ` func help() { - fmt.Fprintln(os.Stderr, usage) + fmt.Fprintf(os.Stderr, usage, version) } diff --git a/timplit.go b/timplit.go index 4c7b326..8e79535 100644 --- a/timplit.go +++ b/timplit.go @@ -11,6 +11,7 @@ import ( ) const ( + version = "v0.0.3" templateName = "timplit" )