MCPcopy
hub / github.com/minio/minio-go / createHTTPTransport

Function createHTTPTransport

functional_tests.go:95–108  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95func createHTTPTransport() (transport *http.Transport) {
96 var err error
97 transport, err = minio.DefaultTransport(mustParseBool(os.Getenv(enableHTTPS)))
98 if err != nil {
99 logError("http-transport", getFuncName(), nil, time.Now(), "", "could not create http transport", err)
100 return nil
101 }
102
103 if mustParseBool(os.Getenv(enableHTTPS)) && mustParseBool(os.Getenv(skipCERTValidation)) {
104 transport.TLSClientConfig.InsecureSkipVerify = true
105 }
106
107 return transport
108}
109
110var readFull = func(r io.Reader, buf []byte) (n int, err error) {
111 // ReadFull reads exactly len(buf) bytes from r into buf.

Callers 7

NewClientFunction · 0.85
testPresignedPostPolicyFunction · 0.85
testFunctionalFunction · 0.85
testFunctionalV2Function · 0.85
testCorsFunction · 0.85

Calls 3

logErrorFunction · 0.85
getFuncNameFunction · 0.85
mustParseBoolFunction · 0.70

Tested by

no test coverage detected