* ast: improve error handling * ast: handle select * dyngo: set filename of executed script * cfg: improve error reporting * Implement select for receiving channels * feat(select): add support for sending channels in case clauses * test: improve tests on select * feat(select): add support for "default" case
11 lines
157 B
Go
11 lines
157 B
Go
package main
|
|
|
|
func send(c chan<- int32) { c <- 123 }
|
|
|
|
func main() {
|
|
channel := make(chan int32)
|
|
go send(channel)
|
|
msg, ok := <-channel
|
|
println(msg, ok)
|
|
}
|