Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • G go
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Kirill Smelkov
  • go
  • Repository

Switch branch/tag
  • go
  • src
  • encoding
  • xml
  • marshal_test.go
Find file BlameHistoryPermalink
  • Didier Spezia's avatar
    encoding/xml: EncodeToken silently eats tokens with invalid type · ca1d6c4b
    Didier Spezia authored Jul 15, 2015
    EncodeToken takes a Token (i.e. an interface{}) as a parameter,
    and expects a value of type StartElement, EndElement, CharData,
    Comment, ProcInst, or Directive.
    
    If a pointer is passed instead, or any type which does not match
    this list, the token is silently ignored.
    
    Added a default case in the type switch to issue a proper error
    when the type is invalid.
    
    The behavior could be later improved by allowing pointers to
    token to be accepted as well, but not for go1.5.
    
    Fixes #11719
    
    Change-Id: Ifd13c1563450b474acf66d57669fdccba76c1949
    Reviewed-on: https://go-review.googlesource.com/12252
    
    Reviewed-by: default avatarAndrew Gerrand <adg@golang.org>
    Reviewed-by: default avatarRuss Cox <rsc@golang.org>
    ca1d6c4b

Replace marshal_test.go

Attach a file by drag & drop or click to upload


Cancel
GitLab will create a branch in your fork and start a merge request.
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7