File: hibp_go1.6.go

package info (click to toggle)
golang-github-muesli-crunchy 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 128 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 358 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// +build go1.6

package crunchy

import (
	"net"
	"net/http"
	"time"
)

func init() {
	HttpClient.Transport = &http.Transport{
		Dial: (&net.Dialer{
			Timeout:   30 * time.Second,
			KeepAlive: 30 * time.Second,
		}).Dial,
		TLSHandshakeTimeout:   10 * time.Second,
		ResponseHeaderTimeout: 10 * time.Second,
		ExpectContinueTimeout: 1 * time.Second,
	}
}