1
0
Fork 0

Add build info if run with debug

master
dump_stack() 2023-04-06 12:50:44 +00:00
parent fad8502639
commit 80d7f9fb52
Signed by: dump_stack
GPG Key ID: BE44DA8C062D87DC
1 changed files with 6 additions and 0 deletions

View File

@ -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)
}