【range表达式简化】
This commit is contained in:
parent
93c41175ee
commit
6e8c17412a
|
@ -50,7 +50,7 @@ func RegisterMsgServer(server IMsgServer) {
|
|||
ticker.Stop() // 意外退出时关闭定时器
|
||||
}()
|
||||
// 循环推送信息
|
||||
for _ = range ticker.C {
|
||||
for range ticker.C {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
topicMsgs := server.onTick()
|
||||
|
|
Loading…
Reference in New Issue