Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(24)

Unified Diff: src/pkg/netchan/common.go

Issue 4243072: code review 4243072: go code: replace closed(c) with x, ok := <-c (Closed)
Patch Set: diff -r 54d4fce9ca0c https://go.googlecode.com/hg Created 14 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/pkg/netchan/export.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/netchan/common.go
===================================================================
--- a/src/pkg/netchan/common.go
+++ b/src/pkg/netchan/common.go
@@ -306,7 +306,7 @@
}
// Receive value from local side for sending to remote side.
-func (nch *netChan) recv() (val reflect.Value, closed bool) {
+func (nch *netChan) recv() (val reflect.Value, ok bool) {
if nch.dir != Send {
panic("recv on wrong direction of channel")
}
@@ -317,7 +317,7 @@
nch.space++
}
nch.space--
- return nch.ch.Recv(), nch.ch.Closed()
+ return nch.ch.Recv()
}
// acked is called when the remote side indicates that
« no previous file with comments | « no previous file | src/pkg/netchan/export.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b