aboutsummaryrefslogtreecommitdiff
path: root/src/database
diff options
context:
space:
mode:
authorAinar Garipov <gugl.zadolbal@gmail.com>2019-09-08 19:36:13 +0300
committerRobert Griesemer <gri@golang.org>2019-09-08 17:28:20 +0000
commit0efbd1015774a2d894138519f1efcf7704bb2d95 (patch)
treed7528bf5239a4875537e7ff7f8a9ae36c21851be /src/database
parent83a78eb91118768d5bb3b536a274a215f5141023 (diff)
downloadgo-0efbd1015774a2d894138519f1efcf7704bb2d95.tar.gz
go-0efbd1015774a2d894138519f1efcf7704bb2d95.zip
all: fix typos
Use the following (suboptimal) script to obtain a list of possible typos: #!/usr/bin/env sh set -x git ls-files |\ grep -e '\.\(c\|cc\|go\)$' |\ xargs -n 1\ awk\ '/\/\// { gsub(/.*\/\//, ""); print; } /\/\*/, /\*\// { gsub(/.*\/\*/, ""); gsub(/\*\/.*/, ""); }' |\ hunspell -d en_US -l |\ grep '^[[:upper:]]\{0,1\}[[:lower:]]\{1,\}$' |\ grep -v -e '^.\{1,4\}$' -e '^.\{16,\}$' |\ sort -f |\ uniq -c |\ awk '$1 == 1 { print $2; }' Then, go through the results manually and fix the most obvious typos in the non-vendored code. Change-Id: I3cb5830a176850e1a0584b8a40b47bde7b260eae Reviewed-on: https://go-review.googlesource.com/c/go/+/193848 Reviewed-by: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'src/database')
-rw-r--r--src/database/sql/convert.go2
-rw-r--r--src/database/sql/convert_test.go4
-rw-r--r--src/database/sql/sql.go2
-rw-r--r--src/database/sql/sql_test.go2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/database/sql/convert.go b/src/database/sql/convert.go
index 4c056a1eda..b966ef970c 100644
--- a/src/database/sql/convert.go
+++ b/src/database/sql/convert.go
@@ -565,7 +565,7 @@ func callValuerValue(vr driver.Valuer) (v driver.Value, err error) {
// coefficient (also known as a significand) as a []byte, and an int32 exponent.
// These are composed into a final value as "decimal = (neg) (form=finite) coefficient * 10 ^ exponent".
// A zero length coefficient is a zero value.
-// The big-endian integer coefficent stores the most significant byte first (at coefficent[0]).
+// The big-endian integer coefficient stores the most significant byte first (at coefficient[0]).
// If the form is not finite the coefficient and exponent should be ignored.
// The negative parameter may be set to true for any form, although implementations are not required
// to respect the negative parameter in the non-finite form.
diff --git a/src/database/sql/convert_test.go b/src/database/sql/convert_test.go
index 8a82891c25..2668a5ed5e 100644
--- a/src/database/sql/convert_test.go
+++ b/src/database/sql/convert_test.go
@@ -525,7 +525,7 @@ func (d *dec) Compose(form byte, negative bool, coefficient []byte, exponent int
// This isn't strictly correct, as the extra bytes could be all zero,
// ignore this for this test.
if len(coefficient) > 16 {
- return fmt.Errorf("coefficent too large")
+ return fmt.Errorf("coefficient too large")
}
copy(d.coefficient[:], coefficient)
@@ -558,7 +558,7 @@ func (d *decFinite) Compose(form byte, negative bool, coefficient []byte, expone
// This isn't strictly correct, as the extra bytes could be all zero,
// ignore this for this test.
if len(coefficient) > 16 {
- return fmt.Errorf("coefficent too large")
+ return fmt.Errorf("coefficient too large")
}
copy(d.coefficient[:], coefficient)
diff --git a/src/database/sql/sql.go b/src/database/sql/sql.go
index 5c5b7dc7e9..93001635be 100644
--- a/src/database/sql/sql.go
+++ b/src/database/sql/sql.go
@@ -2040,7 +2040,7 @@ func (tx *Tx) grabConn(ctx context.Context) (*driverConn, releaseConn, error) {
return nil, nil, ctx.Err()
}
- // closeme.RLock must come before the check for isDone to prevent the Tx from
+ // closemu.RLock must come before the check for isDone to prevent the Tx from
// closing while a query is executing.
tx.closemu.RLock()
if tx.isDone() {
diff --git a/src/database/sql/sql_test.go b/src/database/sql/sql_test.go
index f68cefe43a..ed0099e0e9 100644
--- a/src/database/sql/sql_test.go
+++ b/src/database/sql/sql_test.go
@@ -3783,7 +3783,7 @@ func (c *ctxOnlyConn) ExecContext(ctx context.Context, q string, args []driver.N
// TestQueryExecContextOnly ensures drivers only need to implement QueryContext
// and ExecContext methods.
func TestQueryExecContextOnly(t *testing.T) {
- // Ensure connection does not implment non-context interfaces.
+ // Ensure connection does not implement non-context interfaces.
var connType driver.Conn = &ctxOnlyConn{}
if _, ok := connType.(driver.Execer); ok {
t.Fatalf("%T must not implement driver.Execer", connType)