【range表达式简化】

This commit is contained in:
weizhihong 2023-07-27 17:03:41 +08:00
parent 93c41175ee
commit 6e8c17412a
1 changed files with 1 additions and 1 deletions

View File

@ -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()