1
0
mirror of https://github.com/golang/go synced 2024-11-26 16:26:49 -07:00

channel direction fixes

R=dsymonds
DELTA=2  (0 added, 0 deleted, 2 changed)
OCL=29210
CL=29215
This commit is contained in:
Russ Cox 2009-05-21 17:31:13 -07:00
parent c2fa45b973
commit a3c17d58df

View File

@ -102,7 +102,7 @@ func (v *Map) Add(key string, delta int64) {
}
// TODO(rsc): Make sure map access in separate thread is safe.
func (v *Map) iterate(c <-chan KeyValue) {
func (v *Map) iterate(c chan<- KeyValue) {
for k, v := range v.m {
c <- KeyValue{ k, v };
}
@ -174,7 +174,7 @@ func NewString(name string) *String {
}
// TODO(rsc): Make sure map access in separate thread is safe.
func iterate(c <-chan KeyValue) {
func iterate(c chan<- KeyValue) {
for k, v := range vars {
c <- KeyValue{ k, v };
}