add version option to cli #85

This commit is contained in:
bakito 2022-07-24 18:23:17 +02:00
parent dddd5b2e43
commit 8d85b58ce4
No known key found for this signature in database
GPG key ID: FAF93C1C384DD6B4

View file

@ -8,6 +8,7 @@ import (
"github.com/bakito/adguardhome-sync/pkg/log"
"github.com/bakito/adguardhome-sync/pkg/types"
"github.com/bakito/adguardhome-sync/version"
"github.com/mitchellh/go-homedir"
"github.com/spf13/cobra"
"github.com/spf13/viper"
@ -64,8 +65,9 @@ var (
// rootCmd represents the base command when called without any subcommands
var rootCmd = &cobra.Command{
Use: "adguardhome-sync",
Short: "Synchronize config from one AdGuardHome instance to another",
Use: "adguardhome-sync",
Short: "Synchronize config from one AdGuardHome instance to another",
Version: version.Version,
}
// Execute adds all child commands to the root command and sets flags appropriately.