package main
import (
"fmt"
)
func main() {
var (
chString chan string
chSlice chan []int
)
chSlice = make(chan []int, 1)
chString = make(chan string, 1)
go func() {
chSlice <- make([]int, 1)
chString <- "hello"
close(chSlice)
close(chString)
}()
fmt.Println(<-chSlice, <-chSlice)
fmt.Println(<-chString, <-chString)
}
[0] []
hello