code: func ExpandPathsToFileVisitors(mapper *Mapper, paths string, recursive bool, extensions []string, schema validation.Schema) ([]Visitor, error) {
  	var visitors []Visitor
  	err := filepath.Walk(paths, func(path string, fi os.FileInfo, err error) error {
  		if err != nil {
  			return err
  		}
  
  		if fi.IsDir() {
  			if path != paths && !recursive {
  				return filepath.SkipDir
  			}
  			return nil
  		}
  		// Don't check extension if the filepath was passed explicitly
  		if path != paths && ignoreFile(path, extensions) {
  			return nil
  		}
  
  		visitor := &FileVisitor{
  			Path:          path,
  			StreamVisitor: NewStreamVisitor(nil, mapper, path, schema),
  		}
  
  		visitors = append(visitors, visitor)
  		return nil
  	})
  
  	if err != nil {
  		return nil, err
  	}
  	return visitors, nil
  }
docs: // ExpandPathsToFileVisitors will return a slice of FileVisitors that will handle files from the provided path.
  // After FileVisitors open the files, they will pass a io.Reader to a StreamVisitor to do the reading. (stdin
  // is also taken care of). Paths argument also accepts a single file, and will return a single visitor