code: func cleanDir(filePath string) error {
  	// If the directory doesn't even exist there's nothing to do, and we do
  	// not consider this an error
  	if _, err := os.Stat(filePath); os.IsNotExist(err) {
  		return nil
  	}
  
  	d, err := os.Open(filePath)
  	if err != nil {
  		return err
  	}
  	defer d.Close()
  	names, err := d.Readdirnames(-1)
  	if err != nil {
  		return err
  	}
  	for _, name := range names {
  		if err = os.RemoveAll(filepath.Join(filePath, name)); err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // cleanDir removes everything in a directory, but not the directory itself