-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Description
Is your feature request related to a problem? Please describe.
I have multiple named providers of the same type, and I'd like to decorate one of them
c.Provide(NewReadOnlyConnection, dig.Name("ro"))
c.Provide(NewReadWriteConnection, dig.Name("rw"))However the decorate function doesn't have an option to target these
Lines 159 to 162 in c8eb7b9
| // DecorateOption modifies the default behavior of Decorate. | |
| type DecorateOption interface { | |
| apply(*decorateOptions) | |
| } |
I use this mainly for tests- replacing certain dependencies with test versions.
Is there a non-obvious way to do this? I couldn't find an example in the unit tests.
Is this a breaking change?
No, we could create a new DecorateOption
Ran into this when looking into #230
Metadata
Metadata
Assignees
Labels
No labels