campeon23 / split-fetcher

The code is a concurrent file downloader in Go that splits a file into multiple parts, downloads them in parallel, and assembles the final file, with support for Etag validation to ensure file integrity.
MIT License
1 stars 0 forks source link

Standardize Error Formatting in AssembleFileFromParts. #72

Open campeon23 opened 1 year ago

campeon23 commented 1 year ago
  • Package: assembler
  • Function: AssembleFileFromParts
  • Line code: Lines with return errors.New("...%v" + err.Error()).
  • Recommendation: Error messages are constructed using string concatenation combined with format specifiers. This may lead to confusing error messages. A consistent approach should be used.
  • Description: The function AssembleFileFromParts in package assembler has inconsistencies in error message formatting. Consider using a single method for formatting errors.

Severity: Moderate.