Break out of Groovy 'times' loop

后端 未结 0 1122
广开言路
广开言路 2020-11-30 01:45

Is is possible to break out of the times loop. Something like:

5.times {  
    // do some stuff 
    if (status != "OK") { 
        break 
}
         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题