Remove redundant error logging in HTTP Prober
This commit is contained in:
parent
6b0d9b229f
commit
e77e1d72b8
@ -3,7 +3,6 @@ package httpprober
|
|||||||
import (
|
import (
|
||||||
"crypto/tls"
|
"crypto/tls"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@ -69,13 +68,11 @@ func buildHTTPClient() (*http.Client, error) {
|
|||||||
func testMethod(client *http.Client, target Website) int {
|
func testMethod(client *http.Client, target Website) int {
|
||||||
req, err := http.NewRequest("GET", target.URL, nil)
|
req, err := http.NewRequest("GET", target.URL, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
|
||||||
return -2
|
return -2
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := client.Do(req)
|
resp, err := client.Do(req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
|
||||||
return -1
|
return -1
|
||||||
}
|
}
|
||||||
defer func(body io.ReadCloser) {
|
defer func(body io.ReadCloser) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user