Skip to content

Commit

Permalink
change from review
Browse files Browse the repository at this point in the history
  • Loading branch information
gammazero committed Aug 15, 2024
1 parent 8c4487c commit bec5430
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ var version = buildVersion()

func buildVersion() string {
// Read version from embedded JSON file.
var verMap map[string]string
json.Unmarshal(versionJSON, &verMap)
release := verMap["version"]
var v struct {
Version string `json:"version"`
}
json.Unmarshal(versionJSON, &v)
release := v.Version

info, ok := debug.ReadBuildInfo()
if !ok {
Expand Down

0 comments on commit bec5430

Please sign in to comment.