goldwarden-vaultwarden-bitw.../cli/cmd/version.go

26 lines
372 B
Go
Raw Normal View History

2024-05-04 01:06:24 +02:00
package cmd
import (
"fmt"
_ "embed"
"github.com/spf13/cobra"
)
//go:embed version.txt
var version string
var versionCmd = &cobra.Command{
Use: "version",
Short: "Shows the version of the cli",
Long: `Shows the version of the cli`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}