24 lines
439 B
Go
24 lines
439 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/spf13/cobra"
|
||
|
|
||
|
"git.qtrade.icu/lychiyu/qbtrade/pkg/version"
|
||
|
)
|
||
|
|
||
|
func init() {
|
||
|
// VersionCmd.Flags().String("session", "", "the exchange session name for sync")
|
||
|
RootCmd.AddCommand(VersionCmd)
|
||
|
}
|
||
|
|
||
|
var VersionCmd = &cobra.Command{
|
||
|
Use: "version",
|
||
|
Short: "show version name",
|
||
|
SilenceUsage: true,
|
||
|
Run: func(cmd *cobra.Command, args []string) {
|
||
|
fmt.Println(version.Version)
|
||
|
},
|
||
|
}
|