aboutsummaryrefslogtreecommitdiff
path: root/http.go
diff options
context:
space:
mode:
Diffstat (limited to 'http.go')
-rw-r--r--http.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/http.go b/http.go
index f3a910f..24e0b4d 100644
--- a/http.go
+++ b/http.go
@@ -3,10 +3,13 @@ package checkup
import (
"fmt"
"net/http"
+ "time"
)
func HttpStatusOK(url string, status int) error {
- resp, err := http.Get(url)
+ client := &http.Client{Timeout: 5 * time.Second}
+
+ resp, err := client.Get(url)
if err != nil {
return err