Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
f5387605
Commit
f5387605
authored
Mar 30, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix last 3 references to 'type guards'
R=gri DELTA=3 (0 added, 0 deleted, 3 changed) OCL=26908 CL=26908
parent
a99a7f60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
go_spec.html
doc/go_spec.html
+3
-3
No files found.
doc/go_spec.html
View file @
f5387605
...
...
@@ -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 guard
s)
has the form of a type
assertion (§Type assertion
s)
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"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment