code: func GetClassForVolume(kubeClient clientset.Interface, pv *v1.PersistentVolume) (*storage.StorageClass, error) {
  	if kubeClient == nil {
  		return nil, fmt.Errorf("Cannot get kube client")
  	}
  	className := v1helper.GetPersistentVolumeClass(pv)
  	if className == "" {
  		return nil, fmt.Errorf("Volume has no storage class")
  	}
  
  	class, err := kubeClient.StorageV1().StorageClasses().Get(className, metav1.GetOptions{})
  	if err != nil {
  		return nil, err
  	}
  	return class, nil
  }
docs: // GetClassForVolume locates storage class by persistent volume