code: func expandPkgDir(ctx context.Context, c cipd.Client, packagePrefix string) ([]string, error) {
  	if !strings.HasSuffix(packagePrefix, "/") {
  		return []string{packagePrefix}, nil
  	}
  	pkgs, err := c.ListPackages(ctx, packagePrefix, false, false)
  	if err != nil {
  		return nil, err
  	}
  	// Skip directories.
  	var out []string
  	for _, p := range pkgs {
  		if !strings.HasSuffix(p, "/") {
  			out = append(out, p)
  		}
  	}
  	if len(out) == 0 {
  		return nil, fmt.Errorf("no packages under %s", packagePrefix)
  	}
  	return out, nil
  }
docs: // expandPkgDir takes a package name or '<prefix>/' and returns a list
  // of matching packages (asking backend if necessary). Doesn't recurse, returns
  // only direct children.