Skip to content

x/pkgsite: confusing display of constants block when there are unexported constants #39097

@lukatendai

Description

@lukatendai

If you look at documentation on this page: https://golang.org/pkg/text/template/parse/#NodeType

The NodeDot is 6 and NodeField is 8, but there is nothing between these two constants. however the source has two unexported consts between NodeDot and NodeField, which makes NodeField 8.

When you debug the code you can easly misunderstand the node types but simply counting them from the top.

The documentation should indicate actual values of constants

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.ToolsThis label describes issues relating to any tools in the x/tools repository.help wantedpkgsite

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions