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