-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This adds `dig.DecorateInfo` and `dig.FillDecorateInfo`, which behave like `dig.ProvideInfo` and `dig.FillProvideInfo`, except it's for `scope.Decorate`. It records the input and output parameters of the decorator function that Dig was able to get out of. Example usage: ``` var info DecorateInfo c.Decorate(dcor, FillDecorateInfo(&info)) { ... } // info.Input/info.Output are now lists of stringers (dig.Input) that // record the type/name/group info for each parameter/result types of dcor. ``` As a side note, I considered naming this `FillDecoratorInfo` but since the other option is named `FillProvideInfo`, not `FillProviderInfo`, I'm naming this to `FillDecorateInfo` to keep some level of consistency. Ref GO-1220, #318
- Loading branch information
Showing
3 changed files
with
106 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters