1
0
mirror of https://github.com/golang/go synced 2024-11-08 18:26:14 -07:00
go/src/encoding
Joe Tsai 0b3b5113c0 encoding/csv: truncate carriage returns at EOF
This fixes a regression where only CRLF was folded into LF at EOF.
Now, we also truncate trailing CR at EOF to preserve the old behavior.

Every one of the test cases added exactly matches the behavior
of Go1.9, even if the results are somewhat unexpected.

Fixes #22937

Change-Id: I1bc6550533163ae489ea77ec1e598163267b7eec
Reviewed-on: https://go-review.googlesource.com/81577
Run-TryBot: Joe Tsai <thebrokentoaster@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2017-12-05 18:44:31 +00:00
..
ascii85
asn1 encoding/asn1: allow '&' in PrintableString fields 2017-12-05 18:22:53 +00:00
base32 Revert "go/printer: forbid empty line before first comment in block" 2017-12-01 01:12:26 +00:00
base64 encoding/base64: optimize DecodeString 2017-10-09 15:39:51 +00:00
binary encoding/binary: make new example a bit more idiomatic 2017-11-15 21:26:43 +00:00
csv encoding/csv: truncate carriage returns at EOF 2017-12-05 18:44:31 +00:00
gob encoding/gob: fix a typo in the package documentation 2017-10-08 18:11:32 +00:00
hex encoding/hex: make Decode, Decoder, DecodeString agree about partial results and errors 2017-11-16 01:08:20 +00:00
json encoding/json: remove the word "text" in "JSON text" from package docs. 2017-11-27 18:51:36 +00:00
pem encoding/pem: add Encode example 2017-11-15 03:08:55 +00:00
xml encoding/xml: move unexported const out of exported const block 2017-11-15 21:27:07 +00:00
encoding.go