From 701dda5e3e6a1c79303dd288736fd79a84059afd Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Tue, 26 Apr 2022 09:06:49 +0300 Subject: [PATCH] Fix typo in xml.Unmarshal (#563) Co-authored-by: Chris James --- math.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/math.md b/math.md index e5f9a0171..a57bfa90f 100644 --- a/math.md +++ b/math.md @@ -967,7 +967,8 @@ to parse it. [`encoding/xml`][xml] is the Go package that can handle all things to do with simple XML parsing. -The function [`xml.Unmarshall`](https://pkg.go.dev/encoding/xml#Unmarshal) takes + +The function [`xml.Unmarshal`](https://pkg.go.dev/encoding/xml#Unmarshal) takes a `[]byte` of XML data, and a pointer to a struct for it to get unmarshalled in to. @@ -1034,7 +1035,7 @@ func TestSVGWriterAtMidnight(t *testing.T) { ``` We write the output of `clockface.SVGWriter` to a `bytes.Buffer` -and then `Unmarshall` it into an `Svg`. We then look at each `Line` in the `Svg` +and then `Unmarshal` it into an `Svg`. We then look at each `Line` in the `Svg` to see if any of them have the expected `X2` and `Y2` values. If we get a match we return early (passing the test); if not we fail with a (hopefully) informative message.