(input string)
| 58 | } |
| 59 | |
| 60 | func (cli *ChatCLI) handleGatewayCommand(input string) { |
| 61 | sub := strings.TrimSpace(strings.TrimPrefix(input, "/gateway")) |
| 62 | switch sub { |
| 63 | case "", "start": |
| 64 | cli.gatewayStartDetached() |
| 65 | case "stop": |
| 66 | cli.gatewayStop() |
| 67 | case "status", "platforms": |
| 68 | cli.gatewayStatus() |
| 69 | default: |
| 70 | fmt.Println(colorize(" "+i18n.T("gateway.usage"), ColorGray)) |
| 71 | } |
| 72 | } |
| 73 | |
| 74 | // gatewayStatus reports the running daemon (if any) and which platforms are |
| 75 | // registered/configured. |