// cmd/version.go package cmd import ( "fmt" "os" "s1d3sw1ped/steamcache2/version" "github.com/spf13/cobra" ) // versionCmd represents the version command var versionCmd = &cobra.Command{ Use: "version", Short: "prints the version of steamcache2", Long: `Prints the version of steamcache2. This command is useful for checking the version of the application.`, Run: func(cmd *cobra.Command, args []string) { fmt.Fprintln(os.Stderr, "steamcache2", version.Version, version.Date) }, } func init() { rootCmd.AddCommand(versionCmd) }