Standard library / encoding/xml

encoding/xml.StartElement.End()

Builds the end token corresponding to the start token name. Expected stdout: 'a\n'.

Formal Syntax & Structure

go syntaxgo
func (e StartElement) End() EndElement

Return Value

EndElement

Matching end element.

Working Example

Example Snippetgo
package main
import (  "encoding/xml"  "fmt")
func must(e error) {  if e != nil {    panic(e)  }}
func main() { v := xml.StartElement{Name: xml.Name{Local: "a"}}; fmt.Println(v.End().Name.Local) }
Go Reference