code: func NewKafkaCommand(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {
  	var err error
  	KafkaMain = kafka.NewMain()
  	kafkaCommand := &cobra.Command{
  		Use:   "kafka",
  		Short: "Index data from kafka in Pilosa.",
  		RunE: func(cmd *cobra.Command, args []string) error {
  			start := time.Now()
  			err = KafkaMain.Run()
  			if err != nil {
  				return err
  			}
  			log.Println("Done: ", time.Since(start))
  			select {}
  		},
  	}
  	flags := kafkaCommand.Flags()
  	err = commandeer.Flags(flags, KafkaMain)
  	if err != nil {
  		panic(err)
  	}
  	return kafkaCommand
  }
docs: // NewKafkaCommand returns a new cobra command wrapping KafkaMain.