]> Cypherpunks repositories - gostls13.git/commit
encoding/xml: expose decoder line and column
authorPatrick Gundlach <gundlach@speedata.de>
Mon, 19 Apr 2021 10:51:04 +0000 (12:51 +0200)
committerEmmanuel Odeke <emmanuel@orijtech.com>
Sun, 27 Mar 2022 20:26:46 +0000 (20:26 +0000)
commit0eea25159fe58ab956198f3009e6ded875d2796e
tree5a99bfc092797894d302ae70997eed52e1dc18a7
parent234283d8aba1e892906e889782ae5723686da6c6
encoding/xml: expose decoder line and column

The existing implementation of the xml decoder uses the line number
only for reporting syntax errors. The line number of the last read
token and the column within the line is useful for the users even
in non-error conditions.

Fixes #45628

Change-Id: I37b5033ff5ff8411793d8f5180f96aa4537e83f5
Reviewed-on: https://go-review.googlesource.com/c/go/+/311270
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Emmanuel Odeke <emmanuel@orijtech.com>
Trust: Emmanuel Odeke <emmanuel@orijtech.com>
api/next/45628.txt [new file with mode: 0644]
src/encoding/xml/xml.go
src/encoding/xml/xml_test.go