golang/src/encoding/csv
nobishino 133cdfb469 encoding/csv: clarify that Writer uses different line break than RFC 4180 by default
Package documentation of encoding/csv says:

> this package supports the format described in RFC 4180.

According to section 2 of RFC 4180:

> Each record is located on a separate line, delimited by a line break (CRLF).

On the other hand, Writer uses LF (not CRLF) as newline character by default.

> If [Writer.UseCRLF] is true, the Writer ends each output line with \r\n instead of \n.

Strictly speaking, this behavior is different from RFC 4180.
Package documentation would improve if we clarify that point.

Change-Id: I120e9332b593e1ac9ed8e49f6f8419ea88efc57d
GitHub-Last-Rev: 489167eb04331fa5c623f3da9041a9d34aa258ae
GitHub-Pull-Request: golang/go#67290
Reviewed-on: https://go-review.googlesource.com/c/go/+/584835
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
2024-05-13 21:32:28 +00:00
..
example_test.go encoding/csv: add examples for package 2015-06-22 11:11:37 +00:00
fuzz_test.go encoding/csv: port the go-fuzz function to native fuzzing 2024-04-05 01:26:13 +00:00
reader.go encoding/csv: clarify that Writer uses different line break than RFC 4180 by default 2024-05-13 21:32:28 +00:00
reader_test.go encoding/csv: add Reader.InputOffset method 2022-05-14 04:25:13 +00:00
writer.go encoding: modernize Go documentation 2023-09-08 19:04:28 +00:00
writer_test.go encoding: use strings.Builder 2022-09-06 15:46:20 +00:00