mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 23:05:15 +00:00
25 lines
429 B
Go
25 lines
429 B
Go
|
package cmd
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
|
||
|
"github.com/spf13/cobra"
|
||
|
|
||
|
"github.com/c9s/bbgo/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)
|
||
|
},
|
||
|
}
|
||
|
|