Skip to content

Commit

Permalink
support printing version
Browse files Browse the repository at this point in the history
  • Loading branch information
James Ranson committed Mar 5, 2021
1 parent e6c2588 commit 564ec7d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
package main

import (
"fmt"

"github.com/spf13/cobra"
)

const applicationName = "tricktool"
const applicationVersion = "2.0.0"
const applicationVersion = "2.0.1"

func main() {

Expand All @@ -18,7 +20,11 @@ func main() {
Run: upgradeConfig,
}

var rootCmd = &cobra.Command{Use: "tricktool"}
var rootCmd = &cobra.Command{Use: applicationName, Version: applicationVersion}

rootCmd.AddCommand(cmdUpgradeConfig)
rootCmd.Execute()
err := rootCmd.Execute()
if err != nil {
fmt.Println(err)
}
}

0 comments on commit 564ec7d

Please sign in to comment.