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
febbf82e
Commit
febbf82e
authored
Jul 22, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix some bad spaces
OCL=13363 CL=13363
parent
220edc48
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
go_lang.txt
doc/go_lang.txt
+4
-4
No files found.
doc/go_lang.txt
View file @
febbf82e
...
...
@@ -687,12 +687,12 @@ conversion from expression list to composite value.
Structure literals follow this form directly. Given
type Rat struct { num, den int };
type Num struct { r Rat, f float, s string };
type Rat struct { num, den int };
type Num struct { r Rat, f float, s string };
we can write
pi := Num(Rat(22,7), 3.14159, "pi")
pi := Num(Rat(22,7), 3.14159, "pi")
For array literals, if the size is present the constructed array has that many
elements; trailing elements are given the approprate zero value for that type.
...
...
@@ -705,7 +705,7 @@ if a specified size is less than the number of elements in the expression list.
Map literals are similar except the elements of the expression list are
key-value pairs separated by a colon:
m := map[string]int("good":0, "bad":1, "indifferent":
7)
m := map[string]int("good":0, "bad":1, "indifferent":7)
TODO: helper syntax for nested arrays etc? (avoids repeating types but
complicates the spec needlessly.)
...
...
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