Files
steamcache2/cmd/version.go

24 lines
516 B
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)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}