Source File
html5entities.go
Belonging Package
github.com/yuin/goldmark/util
package utilimport ()//go:generate go run ../_tools emb-structs -i ../_tools/html5entities.json -o ./html5entities.gen.govar _html5entitiesOnce sync.Oncevar _html5entitiesMap map[string]*HTML5Entityfunc buildHTML5Entities() {_html5entitiesOnce.Do(func() {:= make([]HTML5Entity, _html5entitiesLength)_html5entitiesMap = make(map[string]*HTML5Entity, _html5entitiesLength):= 0:= 0for := range _html5entitiesLength {:= + int(_html5entitiesNameIndex[]):= + int(_html5entitiesCharactersIndex[]):= _html5entitiesName[:]:= &[].Name =.Characters = _html5entitiesCharacters[:]_html5entitiesMap[] ===}})}// HTML5Entity struct represents HTML5 entitites.type HTML5Entity struct {Name stringCharacters []byte}// LookUpHTML5EntityByName returns (an HTML5Entity, true) if an entity named// given name is found, otherwise (nil, false).func ( string) (*HTML5Entity, bool) {buildHTML5Entities(), := _html5entitiesMap[]return ,}
![]() |
The pages are generated with Golds v0.8.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |