golang/go

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

Open

#39 097 ouverte le 15 mai 2020

Voir sur GitHub
 (4 commentaires) (0 réactions) (0 assignés)Go (19 008 forks)batch import
DocumentationNeedsInvestigationToolshelp wantedpkgsite

Métriques du dépôt

Stars
 (133 883 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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

Guide contributeur