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

Idea: Separate eventstore/${driver.go} into eventstore/${driver} packages #9

Open
maclav3 opened this issue Dec 7, 2022 · 2 comments
Labels
idea Could be a good idea

Comments

@maclav3
Copy link

maclav3 commented Dec 7, 2022

If there's more drivers, then perhaps

import "esja/pkg/eventstore/sql"

sql.NewStore[MyAggregate](...)

would be better than

import "esja/pkg/eventstore"

eventstore.NewSQLStore[MyAggregate](...)

Besides, we could have separate go.mods for those drivers, so that the main lib doesn't have to depend on postgres or sqlite

@maclav3 maclav3 added the idea Could be a good idea label Dec 7, 2022
@m110
Copy link
Member

m110 commented Dec 7, 2022

Interesting idea with go.mods 🤔 Although it might also be confusing for users that you need additional go get for a package inside the library.

@m110
Copy link
Member

m110 commented Dec 9, 2022

An interesting side-effect of adding a dedicated go.mod to the example is that now there are no dependencies other than testify in the main package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea Could be a good idea
Projects
None yet
Development

No branches or pull requests

2 participants