Files
  • main.go
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
package main

import (
	"fmt"
)

func main() {
	// :show start
	ch := make(chan string)
	close(ch)
	v := <-ch
	fmt.Printf("Receive from closed channel immediately returns zero value of the type: %#v\n", v)
	// :show end
}
go version go1.9.4 linux/amd64