-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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(internal/godocfx): mark status of deprecated items #4525
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, one minor concern below.
// getStatus returns a possibly empty status string for the given | ||
// docs. | ||
func getStatus(doc string) string { | ||
deprecated := "\nDeprecated:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it always work with a newline prefix? Is it possible that it's embedded within a line and only has a whitespace prefix instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may even be able to strengthen this to be two newlines before, but I think this is fine. See https://github.com/golang/go/wiki/Deprecated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
// getStatus returns a possibly empty status string for the given | ||
// docs. | ||
func getStatus(doc string) string { | ||
deprecated := "\nDeprecated:" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We may even be able to strengthen this to be two newlines before, but I think this is fine. See https://github.com/golang/go/wiki/Deprecated.
A separate PR will update the template to use this new field.
A future PR here may include a
status
for the overall package and in the TOC.