golang/go

encoding/json, encoding/xml: update documentation to use embedded fields instead of anonymous fields.

Open

#27.031 geöffnet am 16. Aug. 2018

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

Repository-Metriken

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

Beschreibung

This is a documentation issue.

The json.Marshal documentation refers to "anonymous struct fields," which the spec has been calling "embedded" struct fields since f8b4123613a2cb0c453726033a03a1968205ccae. This is confusing to readers who want to know how embedded struct fields are marshaled and aren't aware of the historic terminology.

Searching the codebase for "anonymous struct" suggests that the encoding/xml godoc has the same issue.

Contributor Guide