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
2fdbf0d5
Commit
2fdbf0d5
authored
Jul 12, 2008
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a couple of minor errors
SVN=126938
parent
d0cf215b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
sieve.go
test/sieve.go
+3
-3
No files found.
test/sieve.go
View file @
2fdbf0d5
...
...
@@ -4,7 +4,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package
M
ain
package
m
ain
// Send the sequence 2, 3, 4, ... to channel 'ch'.
func
Generate
(
ch
*
chan
>
int
)
{
...
...
@@ -30,13 +30,13 @@ func Sieve() {
go
Generate
(
ch
);
// Start Generate() as a subprocess.
for
{
prime
:=
<
ch
;
print
"%d
\n
"
,
prime
;
print
prime
,
"
\n
"
;
ch1
:=
new
(
chan
int
);
go
Filter
(
ch
,
ch1
,
prime
);
ch
=
ch1
}
}
func
M
ain
()
{
func
m
ain
()
{
Sieve
()
}
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