avhimkov
4/13/2017 - 12:25 PM

Respons printed

Respons printed

package main

import (
"fmt"
"net/http"
)

var urls = []string{
			"http://www.google.com/",
			"http://golsng.org/",
			"http://blog.golang.org",
}

func main() {
for _, url := range urls {
		resp, err := http.Head(url)
		if err != nil {
		fmt.Println("Error:", url, err)		
		}
		fmt.Print(url, ": ", resp.Status)
	}
}