Skip to content
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

Merged
merged 5 commits into from
Oct 1, 2017
Merged

Conversation

yesnault
Copy link
Contributor

See TestMarshalComment.

close #184

Signed-off-by: Yvonnick Esnault <[email protected]>
Signed-off-by: Yvonnick Esnault <[email protected]>
Signed-off-by: Yvonnick Esnault <[email protected]>
Signed-off-by: Yvonnick Esnault <[email protected]>
Signed-off-by: Yvonnick Esnault <[email protected]>
@pelletier
Copy link
Owner

Very nice. Thank you very much for your contribution!

@glasser
Copy link

glasser commented Oct 4, 2017

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.

@pelletier
Copy link
Owner

@glasser Sorry I missed your comment! Would you mind writing a code sample of how that feature would be used?

pelletier added a commit that referenced this pull request Jan 18, 2018
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.
pelletier added a commit that referenced this pull request Jan 18, 2018
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

comment in struct
3 participants