sylixos-uploader/cmd/version.go

22 lines
365 B
Go

package cmd
import (
"fmt"
"sylixos-uploader/common"
"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) {
fmt.Println("Version:", common.Version)
},
}
func init() {
RootCmd.AddCommand(versionCmd)
}