MCPcopy Create free account
hub / github.com/go-git/go-git / ExampleInstallProtocol

Function ExampleInstallProtocol

plumbing/transport/client/example_test.go:11–21  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

9)
10
11func ExampleInstallProtocol() {
12 // Create custom net/http client that.
13 httpClient := &http.Client{
14 Transport: &http.Transport{
15 TLSClientConfig: &tls.Config{InsecureSkipVerify: true},
16 },
17 }
18
19 // Install it as default client for https URLs.
20 client.InstallProtocol("https", githttp.NewClient(httpClient))
21}

Callers

nothing calls this directly

Calls 1

InstallProtocolFunction · 0.92

Tested by

no test coverage detected