go.tools: fix various typos

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/97920045
diff --git a/cmd/benchcmp/parse.go b/cmd/benchcmp/parse.go
index c8cb532..30102f8 100644
--- a/cmd/benchcmp/parse.go
+++ b/cmd/benchcmp/parse.go
@@ -102,7 +102,7 @@
 }
 
 // BenchSet is a collection of benchmarks from one
-// testing.B run, keyed by name to faciliate comparison.
+// testing.B run, keyed by name to facilitate comparison.
 type BenchSet map[string][]*Bench
 
 // Parse extracts a BenchSet from testing.B output. Parse
diff --git a/cmd/cover/cover.go b/cmd/cover/cover.go
index 9c15f41..f49b9db 100644
--- a/cmd/cover/cover.go
+++ b/cmd/cover/cover.go
@@ -292,7 +292,7 @@
 var slashslash = []byte("//")
 
 // initialComments returns the prefix of content containing only
-// whitepace and line comments.  Any +build directives must appear
+// whitespace and line comments.  Any +build directives must appear
 // within this region.  This approach is more reliable than using
 // go/printer to print a modified AST containing comments.
 //
@@ -432,7 +432,7 @@
 //
 // counters will be added before S1 and before S3. The block containing S2
 // will be visited in a separate call.
-// TODO: Nested simple blocks get unecessary (but correct) counters
+// TODO: Nested simple blocks get unnecessary (but correct) counters
 func (f *File) addCounters(pos, blockEnd token.Pos, list []ast.Stmt, extendToClosingBrace bool) []ast.Stmt {
 	// Special case: make sure we add a counter to an empty block. Can't do this below
 	// or we will add a counter to an empty statement list after, say, a return statement.
diff --git a/dashboard/builder/main.go b/dashboard/builder/main.go
index 7facbdc..af36db4 100644
--- a/dashboard/builder/main.go
+++ b/dashboard/builder/main.go
@@ -88,7 +88,7 @@
 		Master: rr,
 	}
 
-	// set up work environment, use existing enviroment if possible
+	// set up work environment, use existing environment if possible
 	if goroot.Exists() || *failAll {
 		log.Print("Found old workspace, will use it")
 	} else {
diff --git a/go/pointer/doc.go b/go/pointer/doc.go
index 8cb8397..013cc10 100644
--- a/go/pointer/doc.go
+++ b/go/pointer/doc.go
@@ -20,7 +20,7 @@
 
 We intend to add various presolving optimisations such as Pointer and
 Location Equivalence from (Hardekopf & Lin, SAS '07) and solver
-optimisatisions such as Hybrid- and Lazy- Cycle Detection from
+optimisations such as Hybrid- and Lazy- Cycle Detection from
 (Hardekopf & Lin, PLDI'07),
 
 
diff --git a/go/pointer/gen.go b/go/pointer/gen.go
index c451c8d..c218d58 100644
--- a/go/pointer/gen.go
+++ b/go/pointer/gen.go
@@ -755,7 +755,7 @@
 	}
 }
 
-// genCall generates contraints for call instruction instr.
+// genCall generates constraints for call instruction instr.
 func (a *analysis) genCall(caller *cgnode, instr ssa.CallInstruction) {
 	call := instr.Common()
 
@@ -926,7 +926,7 @@
 	}
 }
 
-// genInstr generates contraints for instruction instr in context cgn.
+// genInstr generates constraints for instruction instr in context cgn.
 func (a *analysis) genInstr(cgn *cgnode, instr ssa.Instruction) {
 	if a.log != nil {
 		var prefix string
diff --git a/go/pointer/labels.go b/go/pointer/labels.go
index 3fd8681..48a9f0b 100644
--- a/go/pointer/labels.go
+++ b/go/pointer/labels.go
@@ -23,8 +23,8 @@
 //      - arrays created by conversions (e.g. []byte("foo"), []byte(s))
 //      - stack- and heap-allocated variables (including composite literals)
 //      - channels, maps and arrays created by make()
-//      - instrinsic or reflective operations that allocate (e.g. append, reflect.New)
-//      - instrinsic objects, e.g. the initial array behind os.Args.
+//      - intrinsic or reflective operations that allocate (e.g. append, reflect.New)
+//      - intrinsic objects, e.g. the initial array behind os.Args.
 //      - and their subelements, e.g. "alloc.y[*].z"
 //
 // Labels are so varied that they defy good generalizations;
@@ -87,7 +87,7 @@
 //      makeinterface                           (tagged object allocated by makeinterface)
 //      <alloc in reflect.Zero>                 (allocation in instrinsic)
 //      sync.Mutex                              (a reflect.rtype instance)
-//      <command-line arguments>                (an instrinsic object)
+//      <command-line arguments>                (an intrinsic object)
 //
 // Labels within compound objects have subelement paths:
 //      x.y[*].z                                (a struct variable, x)
diff --git a/go/pointer/reflect.go b/go/pointer/reflect.go
index ed45177..26ddaf2 100644
--- a/go/pointer/reflect.go
+++ b/go/pointer/reflect.go
@@ -7,7 +7,7 @@
 // For consistency, the names of all parameters match those of the
 // actual functions in the "reflect" package.
 //
-// To avoid proliferation of equivalent labels, instrinsics should
+// To avoid proliferation of equivalent labels, intrinsics should
 // memoize as much as possible, like TypeOf and Zero do for their
 // tagged objects.
 //
diff --git a/go/pointer/testdata/arrayreflect.go b/go/pointer/testdata/arrayreflect.go
index 4b53078..2b23674 100644
--- a/go/pointer/testdata/arrayreflect.go
+++ b/go/pointer/testdata/arrayreflect.go
@@ -19,7 +19,7 @@
 	print(rvsl.Interface().([]*int))     // @pointsto makeslice@slice:15
 	print(rvsl.Interface().([]*int)[42]) // @pointsto main.a
 
-	// reflect.Value contains an arrayay (non-addressable).
+	// reflect.Value contains an array (non-addressable).
 	array := [10]*int{&a} // @line array
 	rvarray := reflect.ValueOf(array).Slice(0, 0)
 	print(rvarray.Interface())              // @types
diff --git a/go/pointer/testdata/hello.go b/go/pointer/testdata/hello.go
index 065ff86..b81784b 100644
--- a/go/pointer/testdata/hello.go
+++ b/go/pointer/testdata/hello.go
@@ -17,7 +17,7 @@
 }
 
 func main() {
-	// os.Args is considered instrincally allocated,
+	// os.Args is considered intrinsically allocated,
 	// but may also be set explicitly (e.g. on Windows), hence '...'.
 	print(os.Args) // @pointsto <command-line args> | ...
 	fmt.Println("Hello, World!", &theS)
diff --git a/go/ssa/emit.go b/go/ssa/emit.go
index 29fcde8..cb68043 100644
--- a/go/ssa/emit.go
+++ b/go/ssa/emit.go
@@ -240,7 +240,7 @@
 }
 
 // emitStore emits to f an instruction to store value val at location
-// addr, applying implicit conversions as required by assignabilty rules.
+// addr, applying implicit conversions as required by assignability rules.
 //
 func emitStore(f *Function, addr, val Value) *Store {
 	s := &Store{
diff --git a/go/ssa/interp/testdata/coverage.go b/go/ssa/interp/testdata/coverage.go
index 503e4e2..628f315 100644
--- a/go/ssa/interp/testdata/coverage.go
+++ b/go/ssa/interp/testdata/coverage.go
@@ -404,7 +404,7 @@
 	// defer func() {
 	// 	r := fmt.Sprint(recover())
 	// 	if r != "interface conversion: interface is nil, not main.I" {
-	// 		panic("I->I type assertion succeeed for nil value")
+	// 		panic("I->I type assertion succeeded for nil value")
 	// 	}
 	// }()
 	// var x I
diff --git a/go/types/ordering.go b/go/types/ordering.go
index cc38cfe..4a64755 100644
--- a/go/types/ordering.go
+++ b/go/types/ordering.go
@@ -34,7 +34,7 @@
 			for _, f := range ityp.Methods.List {
 				if len(f.Names) == 0 {
 					// Embedded interface: The type must be a (possibly
-					// qualified) identifer denoting another interface.
+					// qualified) identifier denoting another interface.
 					// Imported interfaces are already fully resolved,
 					// so we can ignore qualified identifiers.
 					if ident, _ := f.Type.(*ast.Ident); ident != nil {
diff --git a/go/types/resolver.go b/go/types/resolver.go
index 90217f1..1122524 100644
--- a/go/types/resolver.go
+++ b/go/types/resolver.go
@@ -259,7 +259,7 @@
 							// rhs initializer (n:1 var declaration).
 							var d1 *declInfo
 							if len(s.Values) == 1 {
-								// The lhs elements are only set up after the foor loop below,
+								// The lhs elements are only set up after the for loop below,
 								// but that's ok because declareVar only collects the declInfo
 								// for a later phase.
 								d1 = &declInfo{file: fileScope, lhs: lhs, typ: s.Type, init: s.Values[0]}
diff --git a/imports/fix.go b/imports/fix.go
index dd3d817..6b41de2 100644
--- a/imports/fix.go
+++ b/imports/fix.go
@@ -46,7 +46,7 @@
 }
 
 func fixImports(fset *token.FileSet, f *ast.File) (added []string, err error) {
-	// refs are a set of possible package references currently unsatisified by imports.
+	// refs are a set of possible package references currently unsatisfied by imports.
 	// first key: either base package (e.g. "fmt") or renamed package
 	// second key: referenced package symbol (e.g. "Println")
 	refs := make(map[string]map[string]bool)
diff --git a/imports/imports.go b/imports/imports.go
index dd1bc4d..f42c335 100644
--- a/imports/imports.go
+++ b/imports/imports.go
@@ -24,7 +24,7 @@
 
 // Options specifies options for processing files.
 type Options struct {
-	Fragment  bool // Accept fragement of a source file (no package statement)
+	Fragment  bool // Accept fragment of a source file (no package statement)
 	AllErrors bool // Report all errors (not just the first 10 on different lines)
 
 	Comments  bool // Print comments (true if nil *Options provided)
diff --git a/oracle/peers.go b/oracle/peers.go
index d4c910d..5a41073 100644
--- a/oracle/peers.go
+++ b/oracle/peers.go
@@ -153,7 +153,7 @@
 type peersResult struct {
 	queryPos               token.Pos   // of queried '<-' token
 	queryType              types.Type  // type of queried channel
-	makes, sends, receives []token.Pos // positions of alisaed makechan/send/receive instrs
+	makes, sends, receives []token.Pos // positions of aliased makechan/send/receive instrs
 }
 
 func (r *peersResult) display(printf printfFunc) {
diff --git a/oracle/referrers.go b/oracle/referrers.go
index ddab236..ae62db3 100644
--- a/oracle/referrers.go
+++ b/oracle/referrers.go
@@ -71,7 +71,7 @@
 func (p byNamePos) Swap(i, j int)      { p[i], p[j] = p[j], p[i] }
 
 type referrersResult struct {
-	query *ast.Ident   // identifer of query
+	query *ast.Ident   // identifier of query
 	obj   types.Object // object it denotes
 	refs  []*ast.Ident // set of all other references to it
 }
diff --git a/refactor/eg/rewrite.go b/refactor/eg/rewrite.go
index 84a8b29..7e90ee9 100644
--- a/refactor/eg/rewrite.go
+++ b/refactor/eg/rewrite.go
@@ -303,7 +303,7 @@
 	return pattern
 }
 
-// -- utilitiies -------------------------------------------------------
+// -- utilities -------------------------------------------------------
 
 func rvToExpr(rv reflect.Value) ast.Expr {
 	if rv.CanInterface() {