Skip to content

Commit

Permalink
Rename version flag
Browse files Browse the repository at this point in the history
This should make it more compatible with goreleaser build tags
  • Loading branch information
zikani03 committed May 11, 2022
1 parent dd21222 commit e280a9f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions groupby.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (
)

const (
Version = "0.1.0"
SubdirectoryInner = "├──"
SubdirectoryPipe = "│"
SubdirectoryLink = "└──"
Expand All @@ -35,7 +34,8 @@ var (
excludePattern string
filterPattern string = ""
verbose bool
version bool
showVersion bool
version string = "0.0.0"
)

func init() {
Expand All @@ -60,7 +60,7 @@ func init() {
// flag.BoolVar(&recurse, "R", "recurse" "Group files in subdirectories")
flag.BoolVar(&verbose, "verbose", false, "\tShow verbose output")
flag.BoolVar(&verbose, "v", false, "\tShow verbose output")
flag.BoolVar(&version, "version", false, "\tShow the program version and exit")
flag.BoolVar(&showVersion, "version", false, "\tShow the program version and exit")
}

// MonthAsName returns the full month name for the provided monthStr
Expand Down Expand Up @@ -159,8 +159,8 @@ func GetFileInfoYMD(fileInfo os.FileInfo) (int, time.Month, int) {
func main() {
flag.Parse()

if version {
fmt.Println("groupby ", Version, " - Group files and directories by the date they were created or modified")
if showVersion {
fmt.Println("groupby ", version, " - Group files and directories by the date they were created or modified")
fmt.Println("By Zikani Nyirenda Mwase ")
os.Exit(0)
}
Expand Down

0 comments on commit e280a9f

Please sign in to comment.