code: func listPluginCandidates(dirs []string) (map[string][]string, error) {
  	result := make(map[string][]string)
  	for _, d := range dirs {
  		// Silently ignore any directories which we cannot
  		// Stat (e.g. due to permissions or anything else) or
  		// which is not a directory.
  		if fi, err := os.Stat(d); err != nil || !fi.IsDir() {
  			continue
  		}
  		if err := addPluginCandidatesFromDir(result, d); err != nil {
  			// Silently ignore paths which don't exist.
  			if os.IsNotExist(err) {
  				continue
  			}
  			return nil, err // Or return partial result?
  		}
  	}
  	return result, nil
  }
docs: // listPluginCandidates returns a map from plugin name to the list of (unvalidated) Candidates. The list is in descending order of priority.