/*1Copyright © 2022 NAME HERE <EMAIL ADDRESS>2*/3package cmd45import (6"fmt"7"os"8"runtime"910"github.com/alist-org/alist/v3/internal/conf"11"github.com/spf13/cobra"12)1314// VersionCmd represents the version command15var VersionCmd = &cobra.Command{16Use: "version",17Short: "Show current version of AList",18Run: func(cmd *cobra.Command, args []string) {19goVersion := fmt.Sprintf("%s %s/%s", runtime.Version(), runtime.GOOS, runtime.GOARCH)2021fmt.Printf(`Built At: %s22Go Version: %s23Author: %s24Commit ID: %s25Version: %s26WebVersion: %s27`, conf.BuiltAt, goVersion, conf.GitAuthor, conf.GitCommit, conf.Version, conf.WebVersion)28os.Exit(0)29},30}3132func init() {33RootCmd.AddCommand(VersionCmd)3435// Here you will define your flags and configuration settings.3637// Cobra supports Persistent Flags which will work for this command38// and all subcommands, e.g.:39// versionCmd.PersistentFlags().String("foo", "", "A help for foo")4041// Cobra supports local flags which will only run when this command42// is called directly, e.g.:43// versionCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")44}454647