Skip to content

Commit

Permalink
add: add version argument to display the app's
Browse files Browse the repository at this point in the history
 version
  • Loading branch information
Jerome Le Saux committed Jan 2, 2024
1 parent 1f549dd commit f1652d5
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions cli/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ var (
autoextract = flag.String("autoextract", "", "Extract all DSK contained in the folder path")
snaVersion = flag.Int("snaversion", 1, "Set the sna version (1 or 2 available).")
appVersion = "0.21"
version = flag.Bool("version", false, "Display the app's version and quit.")
)

func main() {
Expand All @@ -71,6 +72,11 @@ func main() {
os.Exit(0)
}

if *version {
fmt.Printf("%s", appVersion)
os.Exit(0)
}

if *autotest {
autotests()
os.Exit(0)
Expand Down

0 comments on commit f1652d5

Please sign in to comment.