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

Hash Validation Placement #115

Closed campeon23 closed 1 year ago

campeon23 commented 1 year ago
  • Package Name: main
  • Function Name: run
  • Line Code: 174

Description: The comment // This should be in the same method or function as the switch statement. suggests that the code might not be in the right place. Please review the intended logic and placement of this code.

Severity: Low

campeon23 commented 1 year ago

Based on the commit in the branch refactor/validate-file-integrity-cleanup, the aforementioned comment has been removed. This was a deliberate design choice to pass the hash value to the ValidateFileIntegrity function, ensuring that its design remained simple and didn't become unnecessarily complex. The function's intent is clear, and introducing other values might complicate its functionality.

Commit: Removed the comment and streamlined the ValidateFileIntegrity function to enhance clarity and maintainability.