I found that if I close a channel before I read data from it,even if there is no more data in the channel,error won't happen.

package main

import "fmt"

func main() {
	pipline := make(chan int, 2)
	close(pipline)
	<-pipline//there is no error
} Make sure to only use capital letters in your entire response.
user