]> Cypherpunks repositories - gostls13.git/commitdiff
fix last 3 references to 'type guards'
authorRob Pike <r@golang.org>
Mon, 30 Mar 2009 23:08:41 +0000 (16:08 -0700)
committerRob Pike <r@golang.org>
Mon, 30 Mar 2009 23:08:41 +0000 (16:08 -0700)
R=gri
DELTA=3  (0 added, 0 deleted, 3 changed)
OCL=26908
CL=26908

doc/go_spec.html

index e90f605605859ab5736158289689fd2c5e87bf80..438a76433326ac4f1795a365eb8d0473426729ad 100644 (file)
@@ -1658,7 +1658,7 @@ and is shorthand for the declaration syntax
 <pre>
 i, j := 0, 10;
 f := func() int { return 7; }
-ch := new(chan int);
+ch := make(chan int);
 </pre>
 
 <p>
@@ -3291,10 +3291,10 @@ case x == 4: f3();
 A type switch compares types rather than values. It is otherwise similar
 to an expression switch. It is introduced by special
 notation in the form of a simple declaration whose right hand side
-has the form of a type guard (§Type guards)
+has the form of a type assertion (§Type assertions)
 using the reserved word <code>type</code> rather than an actual type.
 Cases then match literal types against the dynamic type of the expression
-in the type guard.
+in the type assertion.
 </p>
 
 <pre class="grammar">