Skip to content

Commit

Permalink
Merge pull request astaxie#1072 from tilics/master
Browse files Browse the repository at this point in the history
update socket编程部分 readAll -> read
  • Loading branch information
astaxie authored Jun 21, 2019
2 parents f939c7e + ec79d0d commit 9b4cb79
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion zh/08.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,9 @@ func main() {
checkError(err)
_, err = conn.Write([]byte("HEAD / HTTP/1.0\r\n\r\n"))
checkError(err)
result, err := ioutil.ReadAll(conn)
// result, err := ioutil.ReadAll(conn)
result := make([]byte, 256)
_, err = conn.Read(result)
checkError(err)
fmt.Println(string(result))
os.Exit(0)
Expand Down

0 comments on commit 9b4cb79

Please sign in to comment.