code: func getVolumeInfoFromSpec(spec *volume.Spec) (string, string, string, bool, error) {
  	if spec.PersistentVolume != nil {
  		source, readOnly, err := getPersistentVolumeSource(spec)
  		if err != nil {
  			return "", "", "", false, err
  		}
  		return source.VolumeName, source.VolumeNamespace, source.FSType, readOnly, nil
  	}
  
  	if spec.Volume != nil {
  		source, readOnly, err := getVolumeSource(spec)
  		if err != nil {
  			return "", "", "", false, err
  		}
  		return source.VolumeName, source.VolumeNamespace, source.FSType, readOnly, nil
  	}
  	return "", "", "", false, fmt.Errorf("spec not Volume or PersistentVolume")
  }
docs: // Returns StorageOS volume name, namespace, fstype and readonly from spec