all: fix typos in comments

This pull request fixes several typos in comments. I believe that they're safe enough.

Change-Id: Ic7c594bdb89dcd04f8775f225abbc0f966f3728e
GitHub-Last-Rev: 2394feb263714c83b419f45eccb3c6c9fdff7fed
GitHub-Pull-Request: golang/tools#45
Reviewed-on: https://go-review.googlesource.com/128956
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/digraph/digraph.go b/cmd/digraph/digraph.go
index 3ad2950..8ce0e40 100644
--- a/cmd/digraph/digraph.go
+++ b/cmd/digraph/digraph.go
@@ -8,7 +8,7 @@
 //
 // TODO(adonovan):
 // - support input files other than stdin
-// - suport alternative formats (AT&T GraphViz, CSV, etc),
+// - support alternative formats (AT&T GraphViz, CSV, etc),
 //   a comment syntax, etc.
 // - allow queries to nest, like Blaze query language.
 //
diff --git a/cmd/godoc/setup-godoc-app.bash b/cmd/godoc/setup-godoc-app.bash
index f227738..b50d947 100755
--- a/cmd/godoc/setup-godoc-app.bash
+++ b/cmd/godoc/setup-godoc-app.bash
@@ -14,7 +14,7 @@
 # is consulted to find the $GOROOT.
 #
 # The script creates a .zip file representing the $GOROOT file system
-# and computes the correspondig search index files. These files are then
+# and computes the corresponding search index files. These files are then
 # copied to $APPDIR. A corresponding godoc configuration file is created
 # in $APPDIR/appconfig.go.
 
diff --git a/go/packages/doc.go b/go/packages/doc.go
index 7ddb0b5..4f5a1a1 100644
--- a/go/packages/doc.go
+++ b/go/packages/doc.go
@@ -223,7 +223,7 @@
   GOOS and GOARCH seem important enough to warrant a dedicated option.
 
 - How should we handle partial failures such as a mixture of good and
-  malformed patterns, existing and non-existent packages, succesful and
+  malformed patterns, existing and non-existent packages, successful and
   failed builds, import failures, import cycles, and so on, in a call to
   Load?
 
diff --git a/go/packages/packages_test.go b/go/packages/packages_test.go
index 1d50262..93e0e8a 100644
--- a/go/packages/packages_test.go
+++ b/go/packages/packages_test.go
@@ -570,7 +570,7 @@
 
 	// TODO(matloob): The legacy go list based support loads everything from source
 	// because it doesn't do a build and the .a files don't exist.
-	// Can we simulate its existance?
+	// Can we simulate its existence?
 
 	for _, test := range []struct {
 		id         string
diff --git a/godoc/analysis/README b/godoc/analysis/README
index 5b29a32..d3e732e 100644
--- a/godoc/analysis/README
+++ b/godoc/analysis/README
@@ -49,7 +49,7 @@
 
 Type info:
 - In the source viewer's lower pane, use a toggle div around the
-  IMPLEMENTS and METHODSETS lists, like we do in the pacakge view.
+  IMPLEMENTS and METHODSETS lists, like we do in the package view.
   Only expand them initially if short.
 - Include IMPLEMENTS and METHOD SETS information in search index.
 - URLs in IMPLEMENTS/METHOD SETS always link to source, even from the
diff --git a/godoc/index.go b/godoc/index.go
index c9b9bd3..f6de201 100644
--- a/godoc/index.go
+++ b/godoc/index.go
@@ -82,7 +82,7 @@
 
 // A RunList is a list of entries that can be sorted according to some
 // criteria. A RunList may be compressed by grouping "runs" of entries
-// which are equal (according to the sort critera) into a new RunList of
+// which are equal (according to the sort criteria) into a new RunList of
 // runs. For instance, a RunList containing pairs (x, y) may be compressed
 // into a RunList containing pair runs (x, {y}) where each run consists of
 // a list of y's with the same x.
diff --git a/imports/fix.go b/imports/fix.go
index e556dfe..af00670 100644
--- a/imports/fix.go
+++ b/imports/fix.go
@@ -1004,7 +1004,7 @@
 	// permit a directory "foo" to be package
 	// "bar", which is strongly discouraged
 	// anyway. There's no reason goimports needs
-	// to be slow just to accomodate that.
+	// to be slow just to accommodate that.
 	lastTwo := lastTwoComponents(pkg.importPathShort)
 	if strings.Contains(lastTwo, pkgIdent) {
 		return true
diff --git a/playground/common.go b/playground/common.go
index 186537a..81df9e0 100644
--- a/playground/common.go
+++ b/playground/common.go
@@ -49,7 +49,7 @@
 	return nil
 }
 
-var onAppengine = false // will be overriden by appengine.go and appenginevm.go
+var onAppengine = false // will be overridden by appengine.go and appenginevm.go
 
 func allowShare(r *http.Request) bool {
 	if !onAppengine {
diff --git a/present/doc.go b/present/doc.go
index 45039b6..4d27610 100644
--- a/present/doc.go
+++ b/present/doc.go
@@ -224,7 +224,7 @@
 The function html includes the contents of the specified file as
 unescaped HTML. This is useful for including custom HTML elements
 that cannot be created using only the slide format.
-It is your responsibilty to make sure the included HTML is valid and safe.
+It is your responsibility to make sure the included HTML is valid and safe.
 
 	.html file.html
 
diff --git a/refactor/eg/eg.go b/refactor/eg/eg.go
index 02c6dc9..0cd1937 100644
--- a/refactor/eg/eg.go
+++ b/refactor/eg/eg.go
@@ -322,7 +322,7 @@
 	return nil, fmt.Errorf("must contain a single return or expression statement")
 }
 
-// stmtAndExpr returns the expression in the last return statement as well as the preceeding lines.
+// stmtAndExpr returns the expression in the last return statement as well as the preceding lines.
 func stmtAndExpr(fn *ast.FuncDecl) ([]ast.Stmt, ast.Expr, error) {
 	if fn.Body == nil {
 		return nil, nil, fmt.Errorf("no body")
diff --git a/refactor/eg/rewrite.go b/refactor/eg/rewrite.go
index a128158..1c3ee61 100644
--- a/refactor/eg/rewrite.go
+++ b/refactor/eg/rewrite.go
@@ -202,7 +202,7 @@
 				if localchanged {
 					changed = true
 					// we clobber envp here,
-					// which means if we have two sucessive
+					// which means if we have two successive
 					// replacements inside the same statement
 					// we will only generate the setup for one of them.
 					envp = env