Debian Codegraph @

_test/chan7.go

raw symbols SCIP
1 package main
2
3 import "fmt"
4
5 func main() {
6 queue := make(chan string, 2)
7 queue <- "one"
8 queue <- "two"
9 close(queue)
10 for elem := range queue {
11 fmt.Println(elem)
12 }
13 }
14
15 // Output:
16 // one
17 // two