Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor filegenerator to use functional options for configuration #15

Open
c-pius opened this issue May 14, 2024 · 2 comments
Open

Refactor filegenerator to use functional options for configuration #15

c-pius opened this issue May 14, 2024 · 2 comments

Comments

@c-pius
Copy link
Contributor

c-pius commented May 14, 2024

Description

Right now we have filegenerator and reuse-filegenerator which is a decorator on the former. The more idiomatic way in Go would be to move both into the same package and use functional options to configure reuse on top of the plain file generator.

It may look something like the following:

generator, err := filegenerator.New(
  kind,
  fileSystem,
  contentProvider,
  fileGenerator.WithReuse()
)

Figuring out the proper typing and structuring (e.g., with the decorator pattern) may be tricky.

Reasons

Further increase the quality of the project.

Attachments

Copy link

This issue has been automatically marked as stale due to the lack of recent activity. It will soon be closed if no further activity occurs.
Thank you for your contributions.

Copy link

This issue has been automatically closed due to the lack of recent activity.
/lifecycle rotten

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 21, 2024
@janmedrek janmedrek reopened this Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants