From 6ec85b96ad4fee6ec1767f6b78f92a38ce658a06 Mon Sep 17 00:00:00 2001 From: Mitchell Riedstra Date: Sun, 24 Jan 2021 18:29:38 -0500 Subject: Allow the timeout to be adjusted --- http.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'http.go') diff --git a/http.go b/http.go index 24e0b4d..daf8945 100644 --- a/http.go +++ b/http.go @@ -6,8 +6,8 @@ import ( "time" ) -func HttpStatusOK(url string, status int) error { - client := &http.Client{Timeout: 5 * time.Second} +func HttpStatusOK(url string, timeout, status int) error { + client := &http.Client{Timeout: time.Duration(timeout) * time.Second} resp, err := client.Get(url) -- cgit v1.2.3