()
| 41 | } |
| 42 | |
| 43 | func controllerSubCommand() *cobra.Command { |
| 44 | controller := &cobra.Command{ |
| 45 | Use: "controller", |
| 46 | Short: "server controller info", |
| 47 | Run: func(cmd *cobra.Command, args []string) { |
| 48 | fmt.Println("please run with 'list'") |
| 49 | }, |
| 50 | } |
| 51 | |
| 52 | list := &cobra.Command{ |
| 53 | Use: "list", |
| 54 | Short: "list controller info", |
| 55 | Example: "deepflow-ctl server controller list", |
| 56 | Run: func(cmd *cobra.Command, args []string) { |
| 57 | listController(cmd) |
| 58 | }, |
| 59 | } |
| 60 | |
| 61 | controller.AddCommand(list) |
| 62 | return controller |
| 63 | } |
| 64 | |
| 65 | func listController(cmd *cobra.Command) { |
| 66 | server := common.GetServerInfo(cmd) |
no test coverage detected