code: func NewS3Command(stdin io.Reader, stdout, stderr io.Writer) *cobra.Command {
  	var err error
  	S3Main = s3.NewMain()
  	s3Command := &cobra.Command{
  		Use:   "s3",
  		Short: "Index line separated json from objects in an S3 bucket.",
  		RunE: func(cmd *cobra.Command, args []string) error {
  			start := time.Now()
  			err = S3Main.Run()
  			if err != nil {
  				return err
  			}
  			log.Println("Done: ", time.Since(start))
  			select {}
  		},
  	}
  	flags := s3Command.Flags()
  	err = commandeer.Flags(flags, S3Main)
  	if err != nil {
  		panic(err)
  	}
  	return s3Command
  }
docs: // NewS3Command returns a new cobra command wrapping S3Main.