code: func doCleanDirectories(fs billy.Filesystem, dir string) error {
  	files, err := fs.ReadDir(dir)
  	if err != nil {
  		return err
  	}
  	if len(files) == 0 {
  		return fs.Remove(dir)
  	}
  	return nil
  }
docs: // doCleanDirectories removes empty subdirs (without files)