执行 anotherTimeOut.go 并和在第十章(Go 并发-进阶讨论)开发的 slowWWW.go web 服务器交互,将产生如下输出:
$ go run anotherTimeOut.go http://localhost:8001
Get http://localhost:8001: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
$ go run anotherTimeOut.go http://localhost:8001 15
Serving: /
Delay: 8