Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
72a2979e
Commit
72a2979e
authored
Nov 29, 2011
by
David Symonds
Committed by
Robert Griesemer
Nov 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
spec: update spacing to match gofmt, where reasonable.
R=gri, rsc CC=golang-dev
https://golang.org/cl/5327053
parent
c6691d1f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
68 additions
and
68 deletions
+68
-68
doc/go_spec.html
doc/go_spec.html
+68
-68
No files found.
doc/go_spec.html
View file @
72a2979e
...
...
@@ -974,7 +974,7 @@ BaseType = Type .
<pre>
*int
*map[string]
*chan int
*map[string]*chan int
</pre>
<h3
id=
"Function_types"
>
Function types
</h3>
...
...
@@ -1153,9 +1153,9 @@ failure will cause a <a href="#Run_time_panics">run-time panic</a>.
</p>
<pre>
map
[string]
int
map
[*T] struct
{ x, y float64 }
map
[string] interface
{}
map
[string]
int
map
[*T]struct
{ x, y float64 }
map
[string]interface
{}
</pre>
<p>
...
...
@@ -1174,8 +1174,8 @@ which takes the map type and an optional capacity hint as arguments:
</p>
<pre>
make(map[string]
int)
make(map[string]
int, 100)
make(map[string]int)
make(map[string]int, 100)
</pre>
<p>
...
...
@@ -1306,8 +1306,8 @@ Given the declarations
type (
T0 []string
T1 []string
T2 struct
{ a, b int }
T3 struct
{ a, c int }
T2 struct{ a, b int }
T3 struct{ a, c int }
T4 func(int, float64) *T0
T5 func(x int, y float64) *[]string
)
...
...
@@ -1320,7 +1320,7 @@ these types are identical:
<pre>
T0 and T0
[]int and []int
struct
{ a, b *T5 } and struct
{ a, b *T5 }
struct
{ a, b *T5 } and struct
{ a, b *T5 }
func(x int, y float64) *[]string and func(int, float64) (result *[]string)
</pre>
...
...
@@ -1639,7 +1639,7 @@ it is only incremented after each ConstSpec:
<pre>
const (
bit0, mask0 = 1
<<
iota, 1
<<
iota - 1 // bit0 == 1, mask0 == 0
bit0, mask0 = 1
<<
iota, 1
<<
iota - 1 // bit0 == 1, mask0 == 0
bit1, mask1 // bit1 == 2, mask1 == 1
_, _ // skips iota == 2
bit3, mask3 // bit3 == 8, mask3 == 7
...
...
@@ -1670,7 +1670,7 @@ TypeSpec = identifier Type .
type IntArray [16]int
type (
Point struct
{ x, y float64 }
Point struct{ x, y float64 }
Polar Point
)
...
...
@@ -3517,7 +3517,7 @@ order.
For example, in the assignment
</p>
<pre>
y[f()], ok = g(h(), i()
+
x[j()],
<
-c), k()
y[f()], ok = g(h(), i()
+
x[j()],
<
-c), k()
</pre>
<p>
the function calls and communication happen in the order
...
...
@@ -4247,7 +4247,7 @@ for { // send random sequence of bits to c
}
}
select {
} // block forever
select {} // block forever
</pre>
...
...
@@ -4647,7 +4647,7 @@ is negative or larger than <code>m</code>, or if <code>n</code> or
s := make([]int, 10, 100) // slice with len(s) == 10, cap(s) == 100
s := make([]int, 10) // slice with len(s) == cap(s) == 10
c := make(chan int, 10) // channel with a buffer size of 10
m := make(map[string]
int, 100) // map with initial space for 100 elements
m := make(map[string]int, 100) // map with initial space for 100 elements
</pre>
...
...
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