From c76e429f8b8fbc7550e145fea7ec3cf6fc863fb9 Mon Sep 17 00:00:00 2001 From: blek Date: Fri, 3 Nov 2023 03:01:49 +1000 Subject: [PATCH] add version --- main.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 79df355..7131004 100644 --- a/main.go +++ b/main.go @@ -14,6 +14,10 @@ import "net/textproto" import "github.com/alecthomas/kong" +var ( + version string +) + var Args struct { Upload struct { Filename string `optional:"" short:"n" help:"A short name by which the file can be accessed"` @@ -100,7 +104,9 @@ func upload(args *kong.Context) { } func main() { - args := kong.Parse(&Args) + version = "1.0.0" + + args := kong.Parse(&Args, kong.Description(fmt.Sprintf("The blek! File CLI %s", version))) switch args.Command() { case "upload ":