]> Cypherpunks.ru repositories - gostls13.git/commit
encoding/xml: add (*Encoder).Close
authorAxel Wagner <axel.wagner.hh@googlemail.com>
Thu, 18 Aug 2022 14:18:34 +0000 (16:18 +0200)
committerGopher Robot <gobot@golang.org>
Tue, 23 Aug 2022 18:24:30 +0000 (18:24 +0000)
commit7f632f76db65f28038b8797fbfe5e15a9f63e387
treebab5a700953bc26be4d839ae42268d7f22d3a0d4
parentbe9e2440a766f4cd1069945ebd2e527cb7fd7594
encoding/xml: add (*Encoder).Close

Flush can not check for unclosed elements, as more data might be encoded
after Flush is called. Close implicitly calls Flush and also checks that
all opened elements are closed as well.

Fixes #53346

Change-Id: I889b9f5ae54e5dfabb9e6948d96c5ed7bc1110f9
Reviewed-on: https://go-review.googlesource.com/c/go/+/424777
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: David Chase <drchase@google.com>
api/next/53346.txt [new file with mode: 0644]
src/encoding/xml/marshal.go
src/encoding/xml/marshal_test.go