]> Cypherpunks.ru repositories - gostls13.git/commitdiff
encoding/csv: use proper doc comment for Deprecated notes
authorRuss Cox <rsc@golang.org>
Mon, 28 Nov 2022 16:02:52 +0000 (11:02 -0500)
committerGopher Robot <gobot@golang.org>
Fri, 2 Dec 2022 16:30:23 +0000 (16:30 +0000)
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>
api/go1.16.txt
src/encoding/csv/reader.go

index b06d64c3d38eaf834cb99b308f12324442591728..084f592e186dbc9549e0b009abb7f704af8388b3 100644 (file)
@@ -531,6 +531,8 @@ pkg database/sql/driver, type Stmt interface, Exec //deprecated
 pkg database/sql/driver, type Stmt interface, Query //deprecated
 pkg debug/gosym, method (*LineTable) LineToPC //deprecated
 pkg debug/gosym, method (*LineTable) PCToLine //deprecated
+pkg encoding/csv, type Reader struct, TrailingComma //deprecated
+pkg encoding/csv, var ErrTrailingComma //deprecated
 pkg encoding/json, type InvalidUTF8Error //deprecated
 pkg encoding/json, type UnmarshalFieldError //deprecated
 pkg go/build, const AllowBinary //deprecated
index 90a37e6074973bd83f22c226b46c505834c1b309..b83208eb3a4f26983372b4b8d692b5fdeeab629b 100644 (file)
@@ -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