uber-go / dig

A reflection based dependency injection toolkit for Go.
https://go.uber.org/dig
MIT License
3.78k stars 206 forks source link

[WIP] Support simultanous name and group tags #381

Open jquirke opened 1 year ago

jquirke commented 1 year ago

As per Dig issue: https://github.com/uber-go/dig/issues/380

In order to support Fx feature requests

https://github.com/uber-go/fx/issues/998 https://github.com/uber-go/fx/issues/1036

We need to be able to drop the restriction, both in terms of options dig.Name and dig.Group and dig.Out struct annotations on name and group being mutually exclusive.

In a shortly upcoming PR, this can then be exploited to populate value group maps where the 'name' tag becomes the key of a map[string][T]

For now, please do not merge.

CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.