]> Cypherpunks repositories - gostls13.git/commit
html,bzip2,sql: rename Error methods that return error to Err
authorGustavo Niemeyer <gustavo@niemeyer.net>
Fri, 4 Nov 2011 13:50:20 +0000 (09:50 -0400)
committerGustavo Niemeyer <gustavo@niemeyer.net>
Fri, 4 Nov 2011 13:50:20 +0000 (09:50 -0400)
commitf2dc50b48d011d4d585d09d5e6bed350894add3d
treea2f4d381dedf7ed00ffa2ac4c1ab9145ae032426
parent39fcca60cb5a13d2836d5d92cf1ed9aea07f6366
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.

R=bradfitz, rsc
CC=golang-dev
https://golang.org/cl/5327064
src/cmd/gofix/Makefile
src/cmd/gofix/fix.go
src/cmd/gofix/htmlerr.go [new file with mode: 0644]
src/cmd/gofix/htmlerr_test.go [new file with mode: 0644]
src/pkg/compress/bzip2/bit_reader.go
src/pkg/compress/bzip2/bzip2.go
src/pkg/exp/sql/sql.go
src/pkg/html/parse.go
src/pkg/html/token.go
src/pkg/html/token_test.go