diff options
| author | Leigh McCulloch <leighmcc@gmail.com> | 2017-10-27 07:04:49 +0000 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2017-11-01 20:35:59 +0000 |
| commit | 776cdefc072fc916b5f74a7d7fb6e4573a6c8e89 (patch) | |
| tree | 71a97dd476a9a12321710ad2fb574b240bf1708a /src/encoding/xml/read.go | |
| parent | 541bf9f8ea458560353acf78d940c69f5080750a (diff) | |
| download | go-776cdefc072fc916b5f74a7d7fb6e4573a6c8e89.tar.xz | |
encoding/xml: add docs and tests for bool whitespace
Whitespace is ignored in bool values and attrs, but there are no tests
capturing this behavior.
Change-Id: I7a7249de4886f510869e91de937e69b83c3254c8
Reviewed-on: https://go-review.googlesource.com/73890
Reviewed-by: Sam Whited <sam@samwhited.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Sam Whited <sam@samwhited.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding/xml/read.go')
| -rw-r--r-- | src/encoding/xml/read.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/encoding/xml/read.go b/src/encoding/xml/read.go index 2fd6e06688..6709d5aeba 100644 --- a/src/encoding/xml/read.go +++ b/src/encoding/xml/read.go @@ -107,7 +107,8 @@ import ( // to the newly created value. // // Unmarshal maps an XML element or attribute value to a bool by -// setting it to the boolean value represented by the string. +// setting it to the boolean value represented by the string. Whitespace +// is trimmed and ignored. // // Unmarshal maps an XML element or attribute value to an integer or // floating-point field by setting the field to the result of |
