diff options
| author | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-01 23:21:55 +0000 |
|---|---|---|
| committer | Brad Fitzpatrick <bradfitz@golang.org> | 2016-03-02 00:13:47 +0000 |
| commit | 5fea2ccc77eb50a9704fa04b7c61755fe34e1d95 (patch) | |
| tree | 00137f90183ae2a01ca42249e04e9e4dabdf6249 /src/database/sql | |
| parent | 8b4deb448e587802f67930b765c9598fc8cd36e5 (diff) | |
| download | go-5fea2ccc77eb50a9704fa04b7c61755fe34e1d95.tar.xz | |
all: single space after period.
The tree's pretty inconsistent about single space vs double space
after a period in documentation. Make it consistently a single space,
per earlier decisions. This means contributors won't be confused by
misleading precedence.
This CL doesn't use go/doc to parse. It only addresses // comments.
It was generated with:
$ perl -i -npe 's,^(\s*// .+[a-z]\.) +([A-Z]),$1 $2,' $(git grep -l -E '^\s*//(.+\.) +([A-Z])')
$ go test go/doc -update
Change-Id: Iccdb99c37c797ef1f804a94b22ba5ee4b500c4f7
Reviewed-on: https://go-review.googlesource.com/20022
Reviewed-by: Rob Pike <r@golang.org>
Reviewed-by: Dave Day <djd@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/database/sql')
| -rw-r--r-- | src/database/sql/convert.go | 2 | ||||
| -rw-r--r-- | src/database/sql/driver/driver.go | 4 | ||||
| -rw-r--r-- | src/database/sql/driver/types.go | 2 | ||||
| -rw-r--r-- | src/database/sql/fakedb_test.go | 4 | ||||
| -rw-r--r-- | src/database/sql/sql.go | 20 | ||||
| -rw-r--r-- | src/database/sql/sql_test.go | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/src/database/sql/convert.go b/src/database/sql/convert.go index 740fd9d6e7..92c3b689c1 100644 --- a/src/database/sql/convert.go +++ b/src/database/sql/convert.go @@ -44,7 +44,7 @@ func driverArgs(ds *driverStmt, args []interface{}) ([]driver.Value, error) { // Let the Stmt convert its own arguments. for n, arg := range args { // First, see if the value itself knows how to convert - // itself to a driver type. For example, a NullString + // itself to a driver type. For example, a NullString // struct changing into a string or nil. if svi, ok := arg.(driver.Valuer); ok { sv, err := svi.Value() diff --git a/src/database/sql/driver/driver.go b/src/database/sql/driver/driver.go index eca25f29a0..70c44fb921 100644 --- a/src/database/sql/driver/driver.go +++ b/src/database/sql/driver/driver.go @@ -144,7 +144,7 @@ type Stmt interface { // any type to a driver Value. type ColumnConverter interface { // ColumnConverter returns a ValueConverter for the provided - // column index. If the type of a specific column isn't known + // column index. If the type of a specific column isn't known // or shouldn't be handled specially, DefaultValueConverter // can be returned. ColumnConverter(idx int) ValueConverter @@ -154,7 +154,7 @@ type ColumnConverter interface { type Rows interface { // Columns returns the names of the columns. The number of // columns of the result is inferred from the length of the - // slice. If a particular column name isn't known, an empty + // slice. If a particular column name isn't known, an empty // string should be returned for that entry. Columns() []string diff --git a/src/database/sql/driver/types.go b/src/database/sql/driver/types.go index bc54784989..fbca1ea635 100644 --- a/src/database/sql/driver/types.go +++ b/src/database/sql/driver/types.go @@ -15,7 +15,7 @@ import ( // // Various implementations of ValueConverter are provided by the // driver package to provide consistent implementations of conversions -// between drivers. The ValueConverters have several uses: +// between drivers. The ValueConverters have several uses: // // * converting from the Value types as provided by the sql package // into a database table's specific column type and making sure it diff --git a/src/database/sql/fakedb_test.go b/src/database/sql/fakedb_test.go index b5ff121358..662c81d1e9 100644 --- a/src/database/sql/fakedb_test.go +++ b/src/database/sql/fakedb_test.go @@ -37,7 +37,7 @@ var _ = log.Printf // named method on fakeStmt to panic. // // When opening a fakeDriver's database, it starts empty with no -// tables. All tables and data are stored in memory only. +// tables. All tables and data are stored in memory only. type fakeDriver struct { mu sync.Mutex // guards 3 following fields openCount int // conn opens @@ -705,7 +705,7 @@ func (s *fakeStmt) Query(args []driver.Value) (driver.Rows, error) { rows: for _, trow := range t.rows { // Process the where clause, skipping non-match rows. This is lazy - // and just uses fmt.Sprintf("%v") to test equality. Good enough + // and just uses fmt.Sprintf("%v") to test equality. Good enough // for test code. for widx, wcol := range s.whereCol { idx := t.columnIndex(wcol) diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go index 28c36160b5..7ba7ce5c90 100644 --- a/src/database/sql/sql.go +++ b/src/database/sql/sql.go @@ -797,7 +797,7 @@ func (db *DB) conn(strategy connReuseStrategy) (*driverConn, error) { return conn, nil } - // Out of free connections or we were asked not to use one. If we're not + // Out of free connections or we were asked not to use one. If we're not // allowed to open any more connections, make a request and wait. if db.maxOpen > 0 && db.numOpen >= db.maxOpen { // Make the connRequest channel. It's buffered so that the @@ -1207,7 +1207,7 @@ type Tx struct { // ErrTxDone. done bool - // All Stmts prepared for this transaction. These will be closed after the + // All Stmts prepared for this transaction. These will be closed after the // transaction has been committed or rolled back. stmts struct { sync.Mutex @@ -1286,7 +1286,7 @@ func (tx *Tx) Prepare(query string) (*Stmt, error) { // necessary. Or, better: keep a map in DB of query string to // Stmts, and have Stmt.Execute do the right thing and // re-prepare if the Conn in use doesn't have that prepared - // statement. But we'll want to avoid caching the statement + // statement. But we'll want to avoid caching the statement // in the case where we only call conn.Prepare implicitly // (such as in db.Exec or tx.Exec), but the caller package // can't be holding a reference to the returned statement. @@ -1334,7 +1334,7 @@ func (tx *Tx) Prepare(query string) (*Stmt, error) { // be used once the transaction has been committed or rolled back. func (tx *Tx) Stmt(stmt *Stmt) *Stmt { // TODO(bradfitz): optimize this. Currently this re-prepares - // each time. This is fine for now to illustrate the API but + // each time. This is fine for now to illustrate the API but // we should really cache already-prepared statements // per-Conn. See also the big comment in Tx.Prepare. @@ -1441,9 +1441,9 @@ type Stmt struct { closed bool // css is a list of underlying driver statement interfaces - // that are valid on particular connections. This is only + // that are valid on particular connections. This is only // used if tx == nil and one is found that has idle - // connections. If tx != nil, txsi is always used. + // connections. If tx != nil, txsi is always used. css []connStmt // lastNumClosed is copied from db.numClosed when Stmt is created @@ -1741,9 +1741,9 @@ type Rows struct { closeStmt driver.Stmt // if non-nil, statement to Close on close } -// Next prepares the next result row for reading with the Scan method. It +// Next prepares the next result row for reading with the Scan method. It // returns true on success, or false if there is no next result row or an error -// happened while preparing it. Err should be consulted to distinguish between +// happened while preparing it. Err should be consulted to distinguish between // the two cases. // // Every call to Scan, even the first one, must be preceded by a call to Next. @@ -1898,8 +1898,8 @@ func (r *Row) Scan(dest ...interface{}) error { // the Rows in our defer, when we return from this function. // the contract with the driver.Next(...) interface is that it // can return slices into read-only temporary memory that's - // only valid until the next Scan/Close. But the TODO is that - // for a lot of drivers, this copy will be unnecessary. We + // only valid until the next Scan/Close. But the TODO is that + // for a lot of drivers, this copy will be unnecessary. We // should provide an optional interface for drivers to // implement to say, "don't worry, the []bytes that I return // from Next will not be modified again." (for instance, if diff --git a/src/database/sql/sql_test.go b/src/database/sql/sql_test.go index 68f17fb6b0..6f11303c14 100644 --- a/src/database/sql/sql_test.go +++ b/src/database/sql/sql_test.go @@ -911,7 +911,7 @@ func nullTestRun(t *testing.T, spec nullTestSpec) { if err == nil { // TODO: this test fails, but it's just because // fakeConn implements the optional Execer interface, - // so arguably this is the correct behavior. But + // so arguably this is the correct behavior. But // maybe I should flesh out the fakeConn.Exec // implementation so this properly fails. // t.Errorf("expected error inserting nil name with Exec") |
