command_mq_topic_list.go 473 B

12345678910111213141516171819202122232425262728
  1. package shell
  2. import (
  3. "fmt"
  4. "io"
  5. )
  6. func init() {
  7. Commands = append(Commands, &commandMqTopicList{})
  8. }
  9. type commandMqTopicList struct {
  10. }
  11. func (c *commandMqTopicList) Name() string {
  12. return "mq.topic.list"
  13. }
  14. func (c *commandMqTopicList) Help() string {
  15. return `print out all topics`
  16. }
  17. func (c *commandMqTopicList) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) {
  18. fmt.Fprintf(writer, "%s\n", commandEnv.option.Directory)
  19. return nil
  20. }