mirror of
https://github.com/TwiN/gatus.git
synced 2024-11-07 16:44:25 +01:00
20 lines
213 B
Go
20 lines
213 B
Go
package client
|
|
|
|
import (
|
|
"net/http"
|
|
"time"
|
|
)
|
|
|
|
var (
|
|
client *http.Client
|
|
)
|
|
|
|
func GetHttpClient() *http.Client {
|
|
if client == nil {
|
|
client = &http.Client{
|
|
Timeout: time.Second * 10,
|
|
}
|
|
}
|
|
return client
|
|
}
|