From 840b9f48638d8e8b84da75e920bbd827770a97c8 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Tue, 23 Jan 2024 10:06:14 +1100 Subject: [PATCH] include go version --- README.md | 2 ++ main.go | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 4192838..817c1be 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Build Date: `{BUILDTIME}` Build Hash: `{SHA1VER}` +Go version: `{RUNTIME}` + Written by Nathan Coad (nathan.coad@dell.com) ## Overview diff --git a/main.go b/main.go index f13c7ea..1be6599 100644 --- a/main.go +++ b/main.go @@ -11,6 +11,7 @@ import ( "net/http" "os" "os/signal" + "runtime" "smt/controllers" "smt/middlewares" "smt/models" @@ -100,6 +101,7 @@ func main() { // These replacements are for the embedded html generated from README.md replacements["{SHA1VER}"] = sha1ver replacements["{BUILDTIME}"] = buildTime + replacements["{RUNTIME}"] = runtime.Version() // Load data from environment file envFilename := utils.GetFilePath(".env") @@ -121,7 +123,7 @@ func main() { } log.SetOutput(logfileWriter) - log.Printf("SMT starting execution. Built on %s from sha1 %s\n", buildTime, sha1ver) + log.Printf("SMT starting execution. Built on %s from sha1 %s. Runtime %s\n", buildTime, sha1ver, runtime.Version()) /* // for debugging, list all the files that we embedded at compile time