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

Code Refactoring and Enhancement of Application Configuration #165

Closed campeon23 closed 1 year ago

campeon23 commented 1 year ago

Severity: High

Description: There are some areas in the current codebase that require refactoring and enhancement for better maintainability, clarity, and security. This ticket outlines these tasks.

Tasks:

  1. Re-organization and Refactoring:

    • Re-organize and refactor the existing code to improve clarity and maintainability.
    • This includes re-ordering functions/methods, optimizing code structures, and any other refactoring to make the code more readable and efficient.
  2. Data Security Enhancement:

    • Remove instances of fmt.Println() that are revealing sensitive data.
    • This is crucial to maintain data privacy and adhere to best practices.
  3. Application Configuration Enhancement:

    • Introduce a new parameter to the Application Configuration named manifest timestamp.
    • This parameter should capture the creation time of the manifest file when it's stored in memory.
    • The captured timestamp should be utilized to name the manifest file, ensuring it has a unique and time-relevant naming convention.

Acceptance Criteria:

  • The codebase should be re-organized in a clear and maintainable structure, with irrelevant or redundant code sections removed or refactored.
  • All instances of fmt.Println() that exposed sensitive data should be removed. A review should confirm that no sensitive data is printed to console logs.
  • The Application Configuration should have a new manifest timestamp parameter. This should be correctly storing the timestamp and being used in the naming of manifest files.

Note: Once these tasks are implemented, they should be tested thoroughly to ensure they meet the acceptance criteria. If there are any further issues or requirements, they should be added to this ticket or a subsequent one.

campeon23 commented 1 year ago

Changes Implemented:

With these updates in place, the ticket's objectives have been fully addressed. If there are further issues or adjustments required, please reopen this ticket or initiate a new one. Thank you.