Skip to content

Commit

Permalink
Downcase version variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
bjoernalbers committed Apr 11, 2024
1 parent 591c1d8 commit 50a6235
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ integration: build ## Run integration tests
go test integration_test.go

build: ## Build binary
go build -ldflags '-X main.Version=$(VERSION)'
go build -ldflags '-X main.version=$(VERSION)'

generate: ## Generate go wordlists from diceware wordlists
@for f in passphrase/*.txt; do rm -f "$${f%.txt}.go"; done
Expand Down
6 changes: 3 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (
"github.com/bjoernalbers/phrase/passphrase"
)

// Version gets set via build flags
var Version = "unset"
// version gets set via build flags
var version = "unset"

func init() {
log.SetFlags(0)
Expand All @@ -34,7 +34,7 @@ func main() {
displayVersion := flag.Bool("V", false, "Display version and exit")
flag.Parse()
if *displayVersion {
fmt.Println(Version)
fmt.Println(version)
os.Exit(0)
}
var err error
Expand Down

0 comments on commit 50a6235

Please sign in to comment.