-
-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As I was cleaning up the docs, I noticed that a `version` command would go down well. Signed-off-by: quobix <dave@quobix.com>
- Loading branch information
1 parent
2f41083
commit af6b2c1
Showing
2 changed files
with
24 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// Copyright 2022 Dave Shanley / Quobix | ||
// SPDX-License-Identifier: MIT | ||
|
||
package cmd | ||
|
||
import ( | ||
"github.com/pterm/pterm" | ||
"github.com/spf13/cobra" | ||
) | ||
|
||
func GetGenerateVersionCommand() *cobra.Command { | ||
|
||
cmd := &cobra.Command{ | ||
Use: "version", | ||
Short: "Prints the current version of vacuum", | ||
Long: "Prints out the current version of vacuum to the terminal", | ||
Example: "vacuum version", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
pterm.Println(Version) | ||
}, | ||
} | ||
return cmd | ||
} |