From 80d7f9fb52e443ded991331abb9f8ac6790cfc92 Mon Sep 17 00:00:00 2001 From: Mikhail Klementev Date: Thu, 6 Apr 2023 12:50:44 +0000 Subject: [PATCH] Add build info if run with debug --- main.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.go b/main.go index e071779..1c40f00 100644 --- a/main.go +++ b/main.go @@ -8,6 +8,7 @@ import ( "fmt" "math/rand" "os" + "runtime/debug" "strconv" "time" @@ -98,6 +99,11 @@ func main() { }, ) + if buildInfo, ok := debug.ReadBuildInfo(); ok { + log.Debug().Msgf("%v", buildInfo.GoVersion) + log.Debug().Msgf("%v", buildInfo.Settings) + } + err := ctx.Run(&cli.Globals) ctx.FatalIfErrorf(err) }