telegraf/internal/http_go1.11.go

16 lines
236 B
Go

// +build !go1.12
package internal
import "net/http"
func CloseIdleConnections(c *http.Client) {
type closeIdler interface {
CloseIdleConnections()
}
if tr, ok := c.Transport.(closeIdler); ok {
tr.CloseIdleConnections()
}
}