@@ -389,11 +389,7 @@ func uploadPart(preSignedURL, sourcesFile string, featureFlagsWrapper FeatureFla
389389}
390390
391391func SplitZipBySizeGB (zipFilePath string ) ([]string , error ) {
392- partSizeBytes , err := getPartSizeBytes ()
393- if err != nil {
394- return nil , err
395- }
396-
392+ partSizeBytes := getPartSizeBytes ()
397393 f , err := os .Open (zipFilePath )
398394 if err != nil {
399395 return nil , fmt .Errorf ("open input - %w" , err )
@@ -418,7 +414,7 @@ func SplitZipBySizeGB(zipFilePath string) ([]string, error) {
418414 return partNames , nil
419415}
420416
421- func getPartSizeBytes () ( int64 , error ) {
417+ func getPartSizeBytes () int64 {
422418 // Get part size in GB from config if config is not provided, default to 2 GB
423419 partChunkSizeStr := viper .GetString (commonParams .MultipartFileSizeKey )
424420 partChunkSizeFloat , err := strconv .ParseFloat (partChunkSizeStr , 64 )
@@ -437,7 +433,7 @@ func getPartSizeBytes() (int64, error) {
437433 }
438434 logger .PrintIfVerbose ("Splitting zip file into parts of size: " + fmt .Sprintf ("%.0f" , float64 (truncatedSize )) + " GB" )
439435 const bytesPerGB = 1024 * 1024 * 1024
440- return int64 (float64 (truncatedSize ) * float64 (bytesPerGB )), nil
436+ return int64 (float64 (truncatedSize ) * float64 (bytesPerGB ))
441437}
442438
443439func calculatePartSizes (totalSize , partSizeBytes int64 ) []int64 {
0 commit comments