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
194ed070
Commit
194ed070
authored
Mar 07, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a few nits in the typography so HTML is right
SVN=111691
parent
f27e5df4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
go_lang.txt
doc/go_lang.txt
+10
-10
No files found.
doc/go_lang.txt
View file @
194ed070
...
...
@@ -161,7 +161,7 @@ Here is a complete example Go program that implements a concurrent prime sieve:
// Copy the values from channel 'in' to channel 'out',
// removing those divisible by 'prime'.
func Filter(in *chan< int, out *chan> int, prime int) {
for
; ;
{
for {
i := <in; // Receive value of new variable 'i' from 'in'.
if i % prime != 0 {
>out = i; // Send 'i' to channel 'out'.
...
...
@@ -173,7 +173,7 @@ Here is a complete example Go program that implements a concurrent prime sieve:
func Sieve() {
ch := new(chan int); // Create a new channel.
go Generate(ch); // Start Generate() as a subprocess.
for
; ;
{
for {
prime := <ch;
printf("%d\n", prime);
ch1 := new(chan int);
...
...
@@ -262,11 +262,11 @@ Identifiers
An identifier is a name for a program entity such as a variable, a
type, a function, etc. An identifier must not be a reserved word.
identifier = letter { letter | decimal_digit } .
identifier = letter { letter | decimal_digit } .
a
_x
ThisIsVariable9
a
_x
ThisIsVariable9
Types
...
...
@@ -285,16 +285,16 @@ Go defines a number of basic types which are referred to by their
predeclared type names. There are signed and unsigned integer
and floating point types:
bool
the truth values true and false
bool the truth values true and false
uint8
the set of all unsigned 8bit integers
uint8 the set of all unsigned 8bit integers
uint16 the set of all unsigned 16bit integers
uint32 the set of all unsigned 32bit integers
unit64 the set of all unsigned 64bit integers
byte alias for uint8
int8
the set of all signed 8bit integers, in 2's complement
int8 the set of all signed 8bit integers, in 2's complement
int16 the set of all signed 16bit integers, in 2's complement
int32 the set of all signed 32bit integers, in 2's complement
int64 the set of all signed 64bit integers, in 2's complement
...
...
@@ -408,7 +408,7 @@ text into Unicode characters.
* A `little u' value, such as \u12AB. This represents the Unicode
code point with the corresponding hexadecimal value. It always
has exactly 4 hexadecimal digits.
* A `big U' value, such as
'\U00101234'
. This represents the
* A `big U' value, such as
\U00101234
. This represents the
Unicode code point with the corresponding hexadecimal value.
It always has exactly 8 hexadecimal digits.
...
...
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