add --version
This commit is contained in:
@ -228,9 +228,10 @@ func main() {
|
|||||||
var hostFilter []string
|
var hostFilter []string
|
||||||
|
|
||||||
var rootCmd = &cobra.Command{
|
var rootCmd = &cobra.Command{
|
||||||
Use: "ipng-router-backup",
|
Use: "ipng-router-backup",
|
||||||
Short: "SSH Router Backup Tool",
|
Short: "SSH Router Backup Tool",
|
||||||
Long: "Connects to routers via SSH and runs commands, saving output to local files.",
|
Long: "Connects to routers via SSH and runs commands, saving output to local files.",
|
||||||
|
Version: Version,
|
||||||
Run: func(cmd *cobra.Command, args []string) {
|
Run: func(cmd *cobra.Command, args []string) {
|
||||||
fmt.Printf("IPng Networks Router Backup v%s\n", Version)
|
fmt.Printf("IPng Networks Router Backup v%s\n", Version)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user