Skip to content

Commit

Permalink
main: print go info even in release builds
Browse files Browse the repository at this point in the history
  • Loading branch information
jrockway committed May 28, 2022
1 parent 1395130 commit 0a575f8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cmd/jlog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ func printVersion(w io.Writer) {
fmt.Fprintf(w, "Version %s (%s) built on %s by %s\n", version, commit, date, builtBy)
if buildinfo, ok := debug.ReadBuildInfo(); ok {
fmt.Fprintf(w, " go: %v\n", buildinfo.GoVersion)
if commit == "none" {
for _, x := range buildinfo.Settings {
fmt.Fprintf(w, " %v: %v\n", x.Key, x.Value)
}
for _, x := range buildinfo.Settings {
fmt.Fprintf(w, " %v: %v\n", x.Key, x.Value)
}
}
}
Expand Down

0 comments on commit 0a575f8

Please sign in to comment.