Replies: 1 comment
|
Sorry, problem in tag name. Everything work okay. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi.
I'm using
go.uber.org/fx v1.20.0.I wan't to annotate one type with different ResultTags in order to put different instances in container.
Real requirement: gorm DB with master/replica connections
I create two gorm.DB instances, but connected to replica and master
I have two repositories, one needs master, another one need replica.
Repositories provided by fx.Module, where I explicitly say: NewWriteMessageRepository expects master gorm.DB, NewReadMessageRepository expected replica gorm.DB
Main app looks like:
When my app starts, it returns error
Please, help me understand behaviour. Thanks.
All reactions