code: func EqualVolumeCapability(a, b *csi.VolumeCapability) bool {
  	if a == nil || b == nil {
  		return false
  	}
  
  	// Compare access modes.
  	if a.AccessMode != nil && b.AccessMode == nil {
  		return false
  	}
  	if a.AccessMode == nil && b.AccessMode != nil {
  		return false
  	}
  	if a.AccessMode != nil && b.AccessMode != nil &&
  		a.AccessMode.Mode != b.AccessMode.Mode {
  		return false
  	}
  
  	// If both capabilities are block then return true.
  	if a.GetBlock() != nil && b.GetBlock() != nil {
  		return true
  	}
  
  	aMount := a.GetMount()
  	bMount := b.GetMount()
  	if aMount != nil && bMount != nil {
  
  		// If the filesystem types are incompatible then return false.
  		if aMount.FsType != bMount.FsType {
  			return false
  		}
  
  		// Compare the mount flags lengths.
  		if len(aMount.MountFlags) != len(bMount.MountFlags) {
  			return false
  		}
  
  		// Copy the mount flags to prevent the original order
  		// from changing due to the sort operation below.
  		af := append([]string{}, aMount.MountFlags...)
  		bf := append([]string{}, bMount.MountFlags...)
  
  		// Sort the mount flags prior to comparison.
  		sort.Strings(af)
  		sort.Strings(bf)
  
  		// Compare the mount flags.
  		for j := range af {
  			if af[j] != bf[j] {
  				return false
  			}
  		}
  
  		// The mount capabilities are compatible; return true.
  		return true
  	}
  
  	return false
  }
docs: // EqualVolumeCapability returns a flag indicating if two csi.VolumeCapability
  // objects are equal. If a and b are both nil then false is returned.