-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
33 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package cmd | ||
|
||
import "github.com/spf13/cobra" | ||
|
||
var ( | ||
// Version is the version of the application. It is set during the build process using ldflags. | ||
Version = "dev" | ||
// Commit is the commit hash of the application. It is set during the build process using ldflags. | ||
Commit = "none" | ||
// Date is the date of the build. It is set during the build process using ldflags. | ||
BuiltDate = "unknown" | ||
) | ||
|
||
var versionCmd = &cobra.Command{ | ||
Use: "version", | ||
Short: "Print the version number of poe2arb", | ||
RunE: runVersion, | ||
} | ||
|
||
func runVersion(cmd *cobra.Command, args []string) error { | ||
cmd.Printf("poe2arb version %s, commit %s, built at %s\n", Version, Commit, BuiltDate) | ||
|
||
return nil | ||
} |