mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
new new & make
R=r OCL=22166 CL=22166
This commit is contained in:
parent
9662e7b2db
commit
5564504507
113 changed files with 363 additions and 364 deletions
|
|
@ -22,7 +22,7 @@ func FetchGoogle(t *testing.T, fd net.Conn, network, addr string) {
|
|||
req := io.StringBytes("GET / HTTP/1.0\r\nHost: www.google.com\r\n\r\n");
|
||||
n, errno := fd.Write(req);
|
||||
|
||||
buf := new([]byte, 1000);
|
||||
buf := make([]byte, 1000);
|
||||
n, errno = io.Readn(fd, buf);
|
||||
|
||||
if n < 1000 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue