Skip to content

Commit

Permalink
Fix version
Browse files Browse the repository at this point in the history
By default, the variable must be Capitalized
  • Loading branch information
jocgir committed Oct 9, 2024
1 parent dca016f commit f8d631f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import (
"github.com/sirupsen/logrus"
)

// Version is initialized at build time through -ldflags "-X main.Version=<version number>"
var version = "2.7.4"
// Version is initialized at build time through -ldflags "-X main.Version=<Version number>"
var Version string
var tempFolder = errors.Must(os.MkdirTemp("", "gotemplate-")).(string)

const (
Expand Down Expand Up @@ -196,7 +196,7 @@ func runGotemplate() (exitCode int) {
}

if *getVersion {
fmt.Println(version)
fmt.Println(Version)
return 0
}

Expand Down

0 comments on commit f8d631f

Please sign in to comment.