@@ -1059,12 +1059,12 @@ func getTopology(vol *volumes.Volume, topologyReq *csi.TopologyRequirement, igno
10591059}
10601060
10611061func getCreateVolumeResponse (vol * volumes.Volume , volCtx map [string ]string , accessibleTopology []* csi.Topology ) * csi.CreateVolumeResponse {
1062- var volsrc * csi.VolumeContentSource
1062+ var volSrc * csi.VolumeContentSource
10631063
10641064 if vol .SnapshotID != "" {
10651065 volCtx [ResizeRequired ] = "true"
10661066
1067- volsrc = & csi.VolumeContentSource {
1067+ volSrc = & csi.VolumeContentSource {
10681068 Type : & csi.VolumeContentSource_Snapshot {
10691069 Snapshot : & csi.VolumeContentSource_SnapshotSource {
10701070 SnapshotId : vol .SnapshotID ,
@@ -1076,7 +1076,7 @@ func getCreateVolumeResponse(vol *volumes.Volume, volCtx map[string]string, acce
10761076 if vol .SourceVolID != "" {
10771077 volCtx [ResizeRequired ] = "true"
10781078
1079- volsrc = & csi.VolumeContentSource {
1079+ volSrc = & csi.VolumeContentSource {
10801080 Type : & csi.VolumeContentSource_Volume {
10811081 Volume : & csi.VolumeContentSource_VolumeSource {
10821082 VolumeId : vol .SourceVolID ,
@@ -1088,7 +1088,7 @@ func getCreateVolumeResponse(vol *volumes.Volume, volCtx map[string]string, acce
10881088 if vol .BackupID != nil && * vol .BackupID != "" {
10891089 volCtx [ResizeRequired ] = "true"
10901090
1091- volsrc = & csi.VolumeContentSource {
1091+ volSrc = & csi.VolumeContentSource {
10921092 Type : & csi.VolumeContentSource_Snapshot {
10931093 Snapshot : & csi.VolumeContentSource_SnapshotSource {
10941094 SnapshotId : * vol .BackupID ,
@@ -1102,7 +1102,7 @@ func getCreateVolumeResponse(vol *volumes.Volume, volCtx map[string]string, acce
11021102 VolumeId : vol .ID ,
11031103 CapacityBytes : int64 (vol .Size * 1024 * 1024 * 1024 ),
11041104 AccessibleTopology : accessibleTopology ,
1105- ContentSource : volsrc ,
1105+ ContentSource : volSrc ,
11061106 VolumeContext : volCtx ,
11071107 },
11081108 }
0 commit comments