diff options
| author | Mitchell Riedstra <mitch@riedstra.dev> | 2021-01-24 18:29:38 -0500 |
|---|---|---|
| committer | Mitchell Riedstra <mitch@riedstra.dev> | 2021-01-24 18:29:38 -0500 |
| commit | 6ec85b96ad4fee6ec1767f6b78f92a38ce658a06 (patch) | |
| tree | 520dc1c0055a44370c4aaa61fc4daaec8af16090 /http.go | |
| parent | 9c8cc14958c248ddba1669becb5e026d43dd997c (diff) | |
| download | checkup-6ec85b96ad4fee6ec1767f6b78f92a38ce658a06.tar.gz checkup-6ec85b96ad4fee6ec1767f6b78f92a38ce658a06.tar.xz | |
Allow the timeout to be adjusted
Diffstat (limited to 'http.go')
| -rw-r--r-- | http.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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) |
