This is a creation in Article, where the information may have evolved or changed.
"Forum, website":
http://studygolang.com/
http://golangtc.com/
https://golang.org/
First, array and slice
Reference: http://www.jb51.net/article/57121.htm
Second,go func problem and defer
Func Server (Listen *Net. TcpListener) { for{conn, err:=listen. ACCEPTTCP ()ifErr! =Nil {fmt. Println ("Accepttcp_err:", Err. Error ())Continue} fmt. Println ("Accepttcp_from:", Conn. Remoteaddr (). String ()) defer Conn. Close () go func () {data:= Make ([]byte, -) for{i, err:=Conn. Read (data) fmt. Println ("Accepttcp_data:",string(data[0: i]))ifErr! =Nil {fmt. Println ("Accepttcp_readerr:", Err. Error ()) Break} conn. Write ([]byte{'F','I','N','I','s','h'}) } }() }}
Corresponding Understanding reference: http://www.golangtc.com/t/563aeffbb09ecc3197000015
http://blog.csdn.net/eclipser1987/article/details/12089271