|
24 | 24 | Text: "get", |
25 | 25 | Description: "Get information about one or more resources in the cluster", |
26 | 26 | }, |
27 | | - { |
28 | | - Text: "delete", |
29 | | - Description: "Delete a resource in the cluster", |
30 | | - }, |
31 | 27 | { |
32 | 28 | Text: "tail", |
33 | 29 | Description: "Tail all messages in a topic", |
|
42 | 38 | }, |
43 | 39 | } |
44 | 40 |
|
45 | | - deleteSuggestions = []prompt.Suggest{ |
46 | | - { |
47 | | - Text: "topic", |
48 | | - Description: "Delete a single topic", |
49 | | - }, |
50 | | - } |
51 | | - |
52 | 41 | getSuggestions = []prompt.Suggest{ |
53 | 42 | { |
54 | 43 | Text: "acls", |
@@ -238,25 +227,6 @@ func (r *Repl) executor(in string) { |
238 | 227 | case "exit": |
239 | 228 | fmt.Println("Bye!") |
240 | 229 | os.Exit(0) |
241 | | - case "delete": |
242 | | - if len(command.args) == 1 { |
243 | | - log.Error("Unrecognized input. Run 'help' for details on available commands.") |
244 | | - return |
245 | | - } |
246 | | - |
247 | | - switch command.args[1] { |
248 | | - case "topic": |
249 | | - if err := command.checkArgs(3, 3, nil); err != nil { |
250 | | - log.Errorf("Error: %+v", err) |
251 | | - return |
252 | | - } |
253 | | - |
254 | | - topicName := command.args[2] |
255 | | - if err := r.cliRunner.DeleteTopic(ctx, topicName); err != nil { |
256 | | - log.Errorf("Error: %+v", err) |
257 | | - return |
258 | | - } |
259 | | - } |
260 | 230 | case "get": |
261 | 231 | if len(command.args) == 1 { |
262 | 232 | log.Error("Unrecognized input. Run 'help' for details on available commands.") |
@@ -469,10 +439,6 @@ func (r *Repl) completer(doc prompt.Document) []prompt.Suggest { |
469 | 439 | suggestions = commandSuggestions |
470 | 440 | } else if len(words) == 2 && words[0] == "get" { |
471 | 441 | suggestions = getSuggestions |
472 | | - } else if len(words) == 2 && words[0] == "delete" { |
473 | | - suggestions = deleteSuggestions |
474 | | - } else if len(words) == 3 && words[0] == "delete" && (words[1] == "topic") { |
475 | | - suggestions = r.topicSuggestions |
476 | 442 | } else if len(words) == 3 && words[0] == "get" && |
477 | 443 | (words[1] == "balance" || |
478 | 444 | words[1] == "lags" || |
@@ -560,10 +526,6 @@ func helpTable() string { |
560 | 526 | " get topics", |
561 | 527 | "Get all topics", |
562 | 528 | }, |
563 | | - { |
564 | | - " delete topic", |
565 | | - "Deletes a single topic", |
566 | | - }, |
567 | 529 | { |
568 | 530 | " get users", |
569 | 531 | "Get all users", |
|
0 commit comments