-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change for cloudlens version command
- Loading branch information
1 parent
3e91f8c
commit a3b691e
Showing
3 changed files
with
33 additions
and
3 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,28 @@ | ||
package cmd | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/spf13/cobra" | ||
) | ||
|
||
//var short bool | ||
|
||
var command = &cobra.Command{ | ||
Use: "version", | ||
Short: "Print version/build info", | ||
Long: "Print version/build information", | ||
Run: func(cmd *cobra.Command, args []string) { | ||
printVersion("version") | ||
}, | ||
} | ||
|
||
//command.PersistentFlags().BoolVarP(&short, "short", "s", false, "Prints K9s version info in short format") | ||
|
||
func init() { | ||
rootCmd.AddCommand(command) | ||
} | ||
|
||
func printVersion(fmat string) { | ||
fmt.Println("v0.0.8") | ||
} |
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