mirror of
https://github.com/wyx2685/V2bX.git
synced 2025-02-01 22:38:13 -05:00
d76c6a73eb
add conditional compilation support add multi core support
32 lines
548 B
Go
32 lines
548 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
var (
|
|
version = "TempVersion" //use ldflags replace
|
|
codename = "V2bX"
|
|
intro = "A V2board backend based on multi core"
|
|
)
|
|
|
|
var versionCommand = cobra.Command{
|
|
Use: "version",
|
|
Short: "Print version info",
|
|
Run: func(_ *cobra.Command, _ []string) {
|
|
showVersion()
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
command.AddCommand(&versionCommand)
|
|
}
|
|
|
|
func showVersion() {
|
|
fmt.Printf("%s %s (%s) \n", codename, version, intro)
|
|
// Warning
|
|
fmt.Println(Warn("This version need V2board version >= 1.7.0."))
|
|
}
|