| 12345678910111213141516171819202122232425262728293031 |
- package version
- import (
- "fmt"
- "github.com/spf13/cobra"
- "device-manage/common/global"
- )
- var (
- configYml string
- port string
- mode string
- StartCmd = &cobra.Command{
- Use: "version",
- Short: "Get version info",
- Example: "device-manage version",
- PreRun: func(cmd *cobra.Command, args []string) {
- },
- RunE: func(cmd *cobra.Command, args []string) error {
- return run()
- },
- }
- )
- func run() error {
- fmt.Println(global.Version)
- return nil
- }
|