Skip to content

Commit 45b3bed

Browse files
fix lint issue
1 parent 8e08d4d commit 45b3bed

1 file changed

Lines changed: 3 additions & 7 deletions

File tree

internal/wrappers/uploads-http.go

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -389,11 +389,7 @@ func uploadPart(preSignedURL, sourcesFile string, featureFlagsWrapper FeatureFla
389389
}
390390

391391
func 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

443439
func calculatePartSizes(totalSize, partSizeBytes int64) []int64 {

0 commit comments

Comments
 (0)