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:
parent
c2fa45b973
commit
a3c17d58df
@ -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 };
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user