anko
anko copied to clipboard
Select statement
Add select to the language
examples:
a = make(chan int64, 1)
select {
case <-a:
println("value received on a")
default:
println("default")
}
a = make(chan int64, 1)
b = make(chan int64, 1)
b <- 2
val = 0
select {
case val = <-a:
println("value " + val + " received on a")
case val = <-b:
println("value " + val + " received on b")
}
Codecov Report
Merging #325 into master will increase coverage by
0.28%. The diff coverage is100%.
@@ Coverage Diff @@
## master #325 +/- ##
=========================================
+ Coverage 87.42% 87.7% +0.28%
=========================================
Files 15 15
Lines 2663 2742 +79
=========================================
+ Hits 2328 2405 +77
- Misses 216 217 +1
- Partials 119 120 +1
| Impacted Files | Coverage Δ | |
|---|---|---|
| vm/vmStmt.go | 96.69% <100%> (+0.49%) |
:arrow_up: |
| vm/vm.go | 85.84% <0%> (-0.89%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 5f413ab...57d52a5. Read the comment docs.
Any chance this gets merged?