From bc368b309aa2295987fce2cf91b283af002e6b92 Mon Sep 17 00:00:00 2001 From: fdemir Date: Sat, 9 Dec 2023 20:06:18 +0300 Subject: [PATCH] feat: version and add commit and date variables --- main.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/main.go b/main.go index 7fec774..ae08111 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,12 @@ import ( "github.com/urfave/cli/v2" ) +var ( + version = "dev" + commit = "none" + date = "unknown" +) + type Source struct { data map[string]*[]interface{} } @@ -50,11 +56,13 @@ func serve(s *Source, opt *ServeOptions) { } func main() { + app := &cli.App{ Name: "havlu", HelpName: "havlu", Usage: "Get a full take mock REST API with zero coding.", UsageText: "havlu [file] [global options]", + Version: version, Flags: []cli.Flag{ &cli.StringFlag{ Name: "port",