8000 GitHub - lfxnxf/while: 带出口的死循环
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

lfxnxf/while

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

while

带出口的死循环

调用示例

//初始化循环对象,100为最大循环数量
while := NewWhile(100)
 
//todo 业务代码
//模拟业务代码,a初始为100,循环减一,当减到90时退出循环
a := 100
while.For(func() {
   a--
   if a == 90 {
      while.Break()
   }
})
fmt.Println(a)

About

带出口的死循环

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

0