sylixos-uploader/cmd/version.go
2024-11-19 12:49:06 +08:00

22 lines
409 B
Go

package cmd
import (
"sylixos-uploader/common"
"sylixos-uploader/log"
"github.com/spf13/cobra"
)
var versionCmd = &cobra.Command{
Use: "version",
Short: "show sylixos-uploader version",
Long: `show sylixos-uploader version`,
Run: func(cmd *cobra.Command, args []string) {
log.DefaultLogger(log.LogLevelInfo, "Version: %s", common.Version)
},
}
func init() {
RootCmd.AddCommand(versionCmd)
}