mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
fix local volume getVolumeSourceFSType func by golint
This commit is contained in:
parent
d50e920906
commit
4ead52e0f5
@ -322,10 +322,9 @@ func getVolumeSourceFSType(spec *volume.Spec) (string, error) {
|
||||
spec.PersistentVolume.Spec.Local != nil {
|
||||
if spec.PersistentVolume.Spec.Local.FSType != nil {
|
||||
return *spec.PersistentVolume.Spec.Local.FSType, nil
|
||||
} else {
|
||||
// if the FSType is not set in local PV spec, setting it to default ("ext4")
|
||||
return defaultFSType, nil
|
||||
}
|
||||
// if the FSType is not set in local PV spec, setting it to default ("ext4")
|
||||
return defaultFSType, nil
|
||||
}
|
||||
|
||||
return "", fmt.Errorf("spec does not reference a Local volume type")
|
||||
|
Loading…
Reference in New Issue
Block a user