In this section, you will learn how to develop web clients in Go and how to time out a web connection that takes too long to finish.
Developing web clients
Fetching a single URL
In this subsection, you will learn how to read a single web page with the help of the http.Get() function, which is going to be demonstrated in the getURL.go program. The utility will be presented in four parts; the first part of the program is the expected preamble:
package main import ( "fmt" "io" "net/http" "os" "path/filepath" )
Although there is nothing new here, you might find impressive the fact that you will use Go packages that are related to file input and output operations...