Gray out deprecated symbols #456

rakyll opened this Issue Nov 7, 2016 · 3 comments


None yet

3 participants

rakyll commented Nov 7, 2016

If an exported symbol is deprecated, its godoc should be grayed out. Currently, there is no highlighting for deprecated symbols and users cannot easily they are depending on the legacy APIs.


Haha, this is exactly the bug I was going to file. 👍

shurcooL commented Nov 8, 2016

Implementation-wise, I see this being two parts.

First one is some general Go code to determine when a symbol is deprecated. It would have to match the rules that are set out for deprecating a symbol. Reference for that is here:

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.

That should be relatively easy to implement, but does anyone know if this already exists anywhere?

Second part is making use of that to change presentation of such symbols on

rakyll commented Nov 8, 2016 edited

Standard library and official packages use the "Deprecated:" notation, see "ErrWriteAfterFlush" at for an example. grep the Go tree for more examples.

As an example of a standalone deprecated symbol, see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment