golang/go

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

Open

#39.097 geöffnet am 15. Mai 2020

Auf GitHub ansehen
 (4 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Go (19.008 Forks)batch import
DocumentationNeedsInvestigationToolshelp wantedpkgsite

Repository-Metriken

Stars
 (133.883 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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

Contributor Guide