MCPcopy
hub / github.com/cli/cli / WithHost

Function WithHost

pkg/httpmock/stub.go:136–143  ·  view source on GitHub ↗
(matcher Matcher, host string)

Source from the content-addressed store, hash-verified

134}
135
136func WithHost(matcher Matcher, host string) Matcher {
137 return func(req *http.Request) bool {
138 if !strings.EqualFold(req.Host, host) {
139 return false
140 }
141 return matcher(req)
142 }
143}
144
145func WithHeader(responder Responder, header string, value string) Responder {
146 return func(req *http.Request) (*http.Response, error) {

Callers 10

TestGetSessionFunction · 0.92
TestGetJobFunction · 0.92
TestCreateJobFunction · 0.92
Test_getRunFunction · 0.92
TestRemoveRunFunction · 0.92
Test_removeRun_repoFunction · 0.92
Test_removeRun_envFunction · 0.92

Calls

no outgoing calls

Tested by 10

TestGetSessionFunction · 0.74
TestGetJobFunction · 0.74
TestCreateJobFunction · 0.74
Test_getRunFunction · 0.74
TestRemoveRunFunction · 0.74
Test_removeRun_repoFunction · 0.74
Test_removeRun_envFunction · 0.74