packagemain import( "fmt" "os" "bufio" ) funcmain(){ in:=make(chanstring) out:=make(chanstring) reader:=bufio.NewReader(os.Stdin) gofunc(){ for{ a:=<-in out<-a fmt.Println("in",a) } }() gofunc(){ for{ b:=<-out fmt.Println("out",b) } }() for{ line,_:=reader.ReadString('\n') fmt.Println("<----------------------------->") in<-line } }