我有一个需要循环发送消息的函数。问题是在范围内是一个.为什么,以及如何修复它?stopCsstruct{}{}stopCint
func myfunc() {
var stopCs []chan struct{}
// Append to stopCs
return func() {
for stopC := range stopCs {
stopC <- struct{}{}
}
杨魅力
相关分类