You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
243 B

  1. package main
  2. import "fmt"
  3. import "net/http"
  4. import "time"
  5. func main() {
  6. var client = &http.Client{
  7. Timeout: 10 * time.Second,
  8. }
  9. _, err := client.Head("PING_URL")
  10. if err != nil {
  11. fmt.Printf("%s", err)
  12. }
  13. }