MCPcopy Create free account
hub / github.com/libgit2/git2go / registerManagedHTTP

Function registerManagedHTTP

http.go:22–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

20}
21
22func registerManagedHTTP() error {
23 globalRegisteredSmartTransports.Lock()
24 defer globalRegisteredSmartTransports.Unlock()
25
26 for _, protocol := range []string{"http", "https"} {
27 if _, ok := globalRegisteredSmartTransports.transports[protocol]; ok {
28 continue
29 }
30 managed, err := newRegisteredSmartTransport(protocol, true, httpSmartSubtransportFactory, true)
31 if err != nil {
32 return fmt.Errorf("failed to register transport for %q: %v", protocol, err)
33 }
34 globalRegisteredSmartTransports.transports[protocol] = managed
35 }
36 return nil
37}
38
39func httpSmartSubtransportFactory(remote *Remote, transport *Transport) (SmartSubtransport, error) {
40 var proxyFn func(*http.Request) (*url.URL, error)

Callers 2

initLibGit2Function · 0.85
TestMainFunction · 0.85

Calls 1

Tested by 1

TestMainFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…