1 Star 0 Fork 0

clearluo/gotools

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
options.go 569 Bytes
一键复制 编辑 原始数据 按行查看 历史
clearluo 提交于 2022-08-22 09:59 . modify
package utilhttp
import "time"
type (
Option func(c *HttpClientT)
)
func ReqTimeout(reqTimeout time.Duration) Option {
return func(c *HttpClientT) {
c.reqTimeout = reqTimeout
}
}
func MaxIdleConns(maxIdleConns int) Option {
return func(c *HttpClientT) {
c.maxIdleConns = maxIdleConns
}
}
func MaxConnsPerHost(maxConnsPerHost int) Option {
return func(c *HttpClientT) {
c.maxConnsPerHost = maxConnsPerHost
}
}
func MaxIdleConnsPerHost(maxIdleConnsPerHost int) Option {
return func(c *HttpClientT) {
c.maxIdleConnsPerHost = maxIdleConnsPerHost
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/clearluo/gotools.git
git@gitee.com:clearluo/gotools.git
clearluo
gotools
gotools
v1.3.6

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385