Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1776)

Issue 5327064: code review 5327064: html,bzip2,sql: rename Error methods that return error ... (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 6 months ago by niemeyer
Modified:
12 years, 6 months ago
Reviewers:
CC:
bradfitz, rsc, golang-dev
Visibility:
Public.

Description

html,bzip2,sql: rename Error methods that return error to Err There are three classes of methods/functions called Error: a) The Error method in the just introduced error interface b) Error methods that create or report errors (http.Error, etc) c) Error methods that return errors previously associated with the receiver (Tokenizer.Error, rows.Error, etc). This CL introduces the convention that methods in case (c) should be named Err. The reasoning for the change is: - The change differentiates the two kinds of APIs based on names rather than just on signature, unloading Error a bit - Err is closer to the err variable name that is so commonly used with the intent of verifying an error - Err is shorter and thus more convenient to be used often on error verifications, such as in iterators following the convention of the sql package.

Patch Set 1 #

Patch Set 2 : code review 5327064: html,bzip2,sql: Rename some Error methods to Err #

Patch Set 3 : diff -r 4281e3046609 https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 4281e3046609 https://go.googlecode.com/hg/ #

Patch Set 5 : diff -r 4281e3046609 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r a08ea6d0b200 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+103 lines, -16 lines) Patch
M src/cmd/gofix/Makefile View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M src/cmd/gofix/fix.go View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
A src/cmd/gofix/htmlerr.go View 1 2 3 4 5 1 chunk +47 lines, -0 lines 0 comments Download
A src/cmd/gofix/htmlerr_test.go View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
M src/pkg/compress/bzip2/bit_reader.go View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/compress/bzip2/bzip2.go View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M src/pkg/exp/sql/sql.go View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M src/pkg/html/parse.go View 1 2 1 chunk +1 line, -1 line 0 comments Download
M src/pkg/html/token.go View 1 2 3 4 5 1 chunk +2 lines, -2 lines 0 comments Download
M src/pkg/html/token_test.go View 1 2 3 chunks +5 lines, -5 lines 0 comments Download

Messages

Total messages: 5
niemeyer
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 6 months ago (2011-11-03 04:35:06 UTC) #1
bradfitz
LGTM but wait for rsc to review the gofix part more
12 years, 6 months ago (2011-11-03 04:40:19 UTC) #2
rsc
LGTM
12 years, 6 months ago (2011-11-03 13:31:34 UTC) #3
niemeyer
*** Submitted as http://code.google.com/p/go/source/detail?r=e5a512fff2fc *** html,bzip2,sql: rename Error methods that return error to Err There ...
12 years, 6 months ago (2011-11-04 13:50:29 UTC) #4
niemeyer
12 years, 6 months ago (2011-11-04 13:54:24 UTC) #5
Updated to the new gofix data-based ordering before submitting.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b