diff options
author | Joe Tsai <joetsai@digital-static.net> | 2017-10-21 12:07:55 -0700 |
---|---|---|
committer | Joe Tsai <thebrokentoaster@gmail.com> | 2017-10-24 07:10:10 +0000 |
commit | 744da64947188fa849ab6228f9d5fded5f7a1bef (patch) | |
tree | 602c756d558e727574e3ac9527e71f92bb81ded1 /src/encoding/csv | |
parent | 4a0dcc2de115d779b48a0acd1d6b8c9b4c24c307 (diff) | |
download | go-744da64947188fa849ab6228f9d5fded5f7a1bef.tar.gz go-744da64947188fa849ab6228f9d5fded5f7a1bef.zip |
encoding/csv: fix error documentation
We should be referring to ParseError.Err, which is the underlying error,
not ParseError.Error, which is the error method.
Change-Id: Ic3cef5ecbe1ada5fa14b9573222f29da8fc9a8d5
Reviewed-on: https://go-review.googlesource.com/72450
Reviewed-by: Tim Cooper <tim.cooper@layeh.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/csv')
-rw-r--r-- | src/encoding/csv/reader.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/encoding/csv/reader.go b/src/encoding/csv/reader.go index e646740b4f..3f8ff05814 100644 --- a/src/encoding/csv/reader.go +++ b/src/encoding/csv/reader.go @@ -80,7 +80,7 @@ func (e *ParseError) Error() string { return fmt.Sprintf("parse error on line %d, column %d: %v", e.Line, e.Column, e.Err) } -// These are the errors that can be returned in ParseError.Error +// 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") @@ -315,7 +315,7 @@ parseField: // `"` sequence (bare quote). r.recordBuffer = append(r.recordBuffer, '"') default: - // `"*` squence (invalid non-escaped quote). + // `"*` sequence (invalid non-escaped quote). col := utf8.RuneCount(fullLine[:len(fullLine)-len(line)-quoteLen]) err = &ParseError{RecordLine: recLine, Line: r.numLine, Column: col, Err: ErrQuote} break parseField |