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

cmd/doc: const block comments apear after the const block in the generated docs #12533

kostya-sh opened this issue Sep 7, 2015 · 4 comments


Copy link


Source (comment before the const block):

// Possible values for the EncryptPEMBlock encryption algorithm.
const (
    _ PEMCipher = iota


More examples:

Copy link

@kostya-sh all comments are presented after the block they are attached too, not just consts.

Copy link
Contributor Author

@davecheney, it could be the way godoc works now, but I believe it is not intuitive (at least for consts). Docs for const blocks like clearly demonstrate it.

ToNearestEven RoundingMode = iota // == IEEE 754-2008 roundTiesToEven
ToNearestAway // == IEEE 754-2008 roundTiesToAway
The following rounding modes are supported.

The following example doesn't look right ;)

Copy link

robpike commented Sep 7, 2015

Working as intended. The descriptions are presented after the items.

@robpike robpike closed this as completed Sep 7, 2015
Copy link
Contributor Author

Should documentation for some const blocks be re-worded instead? It looks ok in the source code but not in the generated HTML. Examples:

@golang golang locked and limited conversation to collaborators Sep 6, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

4 participants