Skip to content

Commit

Permalink
Fix for goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
knightpp committed May 21, 2023
1 parent de9357f commit 0860fa7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ var (
selectAll bool
selectAllNoConfirm bool
dryRun bool
version bool
flagVersion bool
)

func init() {
flag.BoolVar(&selectAll, "a", false, "select everything by default")
flag.BoolVar(&selectAllNoConfirm, "A", false, "select and update everything without confirmation")
flag.BoolVar(&dryRun, "d", false, "dry run, just print what will be executed")
flag.BoolVar(&version, "v", false, "show version information")
flag.BoolVar(&flagVersion, "v", false, "show version information")
}

func main() {
flag.Parse()

if version {
fmt.Printf("revision:\t%s\ndate:\t\t%s\ndirty:\t\t%v\ncompiler:\t%s\n", vcsCommit, vcsTime, vcsModified, compiler)
if flagVersion {
fmt.Printf("version:\t%srevision:\t%s\ndate:\t\t%s\ndirty:\t\t%v\ncompiler:\t%s\n", version, vcsCommit, vcsTime, vcsModified, compiler)
return
}

Expand Down
1 change: 1 addition & 0 deletions version.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
)

var (
version string
vcsCommit string
vcsTime time.Time
vcsModified bool
Expand Down

0 comments on commit 0860fa7

Please sign in to comment.