Skip to content

refactoring: Removed the Downloader object. - #23

Merged
cmaglie merged 7 commits into
mainfrom
refactor-yeah
Jan 12, 2026
Merged

cmaglie merged 7 commits into
mainfrom
refactor-yeah

Conversation

@cmaglie

@cmaglie cmaglie commented Jan 12, 2026

Copy link
Copy Markdown
Member

After a number of iterations, I found that the original design with a Downloader object was not worth it. Since we are making a breaking change, let's do it for good.

In this PR, I've removed the Downloader object, and I've changed the two-step process (creating the Downloader object and calling the Run method on it) into a single function call to Download.

Other small changes in this PR:

  • Removed the Download function without the context, and harmonized the existing ones.
  • Added a default value for PollInterval.
  • Exploited the new design to improve the readability of the implementation.

Base automatically changed from error_check to main January 12, 2026 09:04
@cmaglie cmaglie self-assigned this Jan 12, 2026
@cmaglie cmaglie added the enhancement New feature or request label Jan 12, 2026

@lucarin91 lucarin91 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a way better interface

Comment thread downloader.go Resolved
@cmaglie
cmaglie merged commit d5e060f into main Jan 12, 2026
3 checks passed
@cmaglie
cmaglie deleted the refactor-yeah branch January 12, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants