aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/csv/reader.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2022-11-28 11:02:52 -0500
committerGopher Robot <gobot@golang.org>2022-12-02 16:30:23 +0000
commitdb4be8f510f0c4cddd45f51bcb24168414d9e2b2 (patch)
tree4f933ca51f929fcc9fa6f7fa40ea4dfad606a603 /src/encoding/csv/reader.go
parent5a4e440f489d110c80e4265560cab2101a2fcdc4 (diff)
downloadgo-db4be8f510f0c4cddd45f51bcb24168414d9e2b2.tar.xz
encoding/csv: use proper doc comment for Deprecated notes
End-of-line comments are not doc comments, so Deprecated notes in them are not recognized as deprecation notices. Rewrite the comments. Change-Id: I275fa9aec403132fda45853e52daa22bc06fcd36 Reviewed-on: https://go-review.googlesource.com/c/go/+/453617 Reviewed-by: Bryan Mills <bcmills@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Auto-Submit: Russ Cox <rsc@golang.org> Run-TryBot: Russ Cox <rsc@golang.org> Reviewed-by: Joseph Tsai <joetsai@digital-static.net> Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/encoding/csv/reader.go')
-rw-r--r--src/encoding/csv/reader.go13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/encoding/csv/reader.go b/src/encoding/csv/reader.go
index 90a37e6074..b83208eb3a 100644
--- a/src/encoding/csv/reader.go
+++ b/src/encoding/csv/reader.go
@@ -84,10 +84,12 @@ func (e *ParseError) Unwrap() error { return e.Err }
// These are the errors that can be returned in ParseError.Err.
var (
- ErrTrailingComma = errors.New("extra delimiter at end of line") // Deprecated: No longer used.
- ErrBareQuote = errors.New("bare \" in non-quoted-field")
- ErrQuote = errors.New("extraneous or missing \" in quoted-field")
- ErrFieldCount = errors.New("wrong number of fields")
+ ErrBareQuote = errors.New("bare \" in non-quoted-field")
+ ErrQuote = errors.New("extraneous or missing \" in quoted-field")
+ ErrFieldCount = errors.New("wrong number of fields")
+
+ // Deprecated: ErrTrailingComma is no longer used.
+ ErrTrailingComma = errors.New("extra delimiter at end of line")
)
var errInvalidDelim = errors.New("csv: invalid field or comment delimiter")
@@ -142,7 +144,8 @@ type Reader struct {
// By default, each call to Read returns newly allocated memory owned by the caller.
ReuseRecord bool
- TrailingComma bool // Deprecated: No longer used.
+ // Deprecated: TrailingComma is no longer used.
+ TrailingComma bool
r *bufio.Reader