-
Notifications
You must be signed in to change notification settings - Fork 212
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
feat: annotation comment on struct #185
Conversation
Signed-off-by: Yvonnick Esnault <[email protected]>
117a8c2
to
c58d639
Compare
Signed-off-by: Yvonnick Esnault <[email protected]>
Signed-off-by: Yvonnick Esnault <[email protected]>
a2fe53c
to
e47763c
Compare
Signed-off-by: Yvonnick Esnault <[email protected]>
Signed-off-by: Yvonnick Esnault <[email protected]>
Very nice. Thank you very much for your contribution! |
I was just thinking about adding this feature (for golang/dep#1224)! Thanks for doing so. It is somewhat awkward to write long comments on a struct tag, and impossible to include dynamic comments this way. Another alternative would have been to make Comment and Commented be methods that a type (for the field itself, not the surrounding type) to implement, discoverable via reflection. |
@glasser Sorry I missed your comment! Would you mind writing a code sample of how that feature would be used? |
Patch #185 introduced a backward incompatibility by changing the arguments of the `Set*` methods on `Tree`. This change restores the arguments to what they previous were, and introduces `SetWithComment` and `SetPathWithComment` to perform the same action.
Patch #185 introduced a backward incompatibility by changing the arguments of the `Set*` methods on `Tree`. This change restores the arguments to what they previous were, and introduces `SetWithComment` and `SetPathWithComment` to perform the same action.
See TestMarshalComment.
close #184