Simple blogging system written in Go https://goblog.app
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

23 lines
347 B

package main
import (
"net/http"
"time"
)
type httpClient interface {
Do(req *http.Request) (*http.Response, error)
}
func getHTTPClient() httpClient {
return &http.Client{
Timeout: 5 * time.Minute,
Transport: &http.Transport{
DisableKeepAlives: true,
},
}
}
func (a *goBlog) initHTTPClient() {
a.httpClient = getHTTPClient()
}