Standard library / encoding/xml
encoding/xml.UnsupportedTypeError
Reports the reflected unsupported Go type encountered during XML encoding. Expected stdout: 'true chan\n'.
Formal Syntax & Structure
go syntaxgo
type UnsupportedTypeError struct { Type reflect.Type}Working Example
Example Snippetgo
package main
import ( "encoding/xml" "errors" "fmt")
func must(e error) { if e != nil { panic(e) }}
func main() { _, e := xml.Marshal(make(chan int)) var ue *xml.UnsupportedTypeError fmt.Println(errors.As(e, &ue), ue.Type.Kind())}