code: func ParsePackagesFromDir(dirpath string) {
  	c := make(chan error)
  
  	go func() {
  		filepath.Walk(dirpath, func(fpath string, fileInfo os.FileInfo, err error) error {
  			if err != nil {
  				return nil
  			}
  			if !fileInfo.IsDir() {
  				return nil
  			}
  
  			// skip folder if it's a 'vendor' folder within dirpath or its child,
  			// all 'tests' folders and dot folders wihin dirpath
  			d, _ := filepath.Rel(dirpath, fpath)
  			if !(d == "vendor" || strings.HasPrefix(d, "vendor"+string(os.PathSeparator))) &&
  				!strings.Contains(d, "tests") &&
  				!(d[0] == '.') {
  				err = parsePackageFromDir(fpath)
  				if err != nil {
  					// Send the error to through the channel and continue walking
  					c <- fmt.Errorf("error while parsing directory: %s", err.Error())
  					return nil
  				}
  			}
  			return nil
  		})
  		close(c)
  	}()
  
  	for err := range c {
  		beeLogger.Log.Warnf("%s", err)
  	}
  }
docs: // ParsePackagesFromDir parses packages from a given directory