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

Missing support for the deprecated option #396

Closed
tsl0922 opened this issue Jul 24, 2017 · 2 comments
Closed

Missing support for the deprecated option #396

tsl0922 opened this issue Jul 24, 2017 · 2 comments
Assignees

Comments

@tsl0922
Copy link

tsl0922 commented Jul 24, 2017

Syntax:

int32 old_field = 6 [deprecated=true];

https://blog.golang.org/godoc-documenting-go-code

Sometimes a struct field, function, type, or even a whole package becomes redundant or unnecessary, but must be kept for compatibility with existing programs. To signal that an identifier should not be used, add a paragraph to its doc comment that begins with "Deprecated:" followed by some information about the deprecation.

@paranoiacblack
Copy link
Contributor

@tsl0922 Is this only a documentation enhancement? As in, whereever there is a deprecated proto field, guarantee that the generated pb.go file explicitly documents fields as "Deprecated:" like mentioned in that article. Is there something else to it?

@dsnet
Copy link
Member

dsnet commented Feb 1, 2018

That should be it. golang/go#10909 documents "Deprecated:" as special. Tools like golint and godoc will treat deprecated specially by either warning on their usage or hiding them from documentation (golang/go#17056).

@paranoiacblack paranoiacblack self-assigned this Feb 1, 2018
@golang golang locked and limited conversation to collaborators Jun 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants