diff options
author | Ainar Garipov <gugl.zadolbal@gmail.com> | 2019-09-08 19:36:13 +0300 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2019-09-08 17:28:20 +0000 |
commit | 0efbd1015774a2d894138519f1efcf7704bb2d95 (patch) | |
tree | d7528bf5239a4875537e7ff7f8a9ae36c21851be /test/closure2.go | |
parent | 83a78eb91118768d5bb3b536a274a215f5141023 (diff) | |
download | go-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 'test/closure2.go')
-rw-r--r-- | test/closure2.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/closure2.go b/test/closure2.go index 4d61b45d3f..e4db05d884 100644 --- a/test/closure2.go +++ b/test/closure2.go @@ -74,7 +74,7 @@ func main() { for i := range [2]int{} { if i == 0 { g = func() int { - return i // test that we capture by ref here, i is mutated on every interation + return i // test that we capture by ref here, i is mutated on every interaction } } } @@ -90,7 +90,7 @@ func main() { q++ g = func() int { return q // test that we capture by ref here - // q++ must on a different decldepth than q declaration + // q++ must on a different decldepth than q declaration } } if g() != 2 { @@ -108,7 +108,7 @@ func main() { }()] = range [2]int{} { g = func() int { return q // test that we capture by ref here - // q++ must on a different decldepth than q declaration + // q++ must on a different decldepth than q declaration } } if g() != 2 { |