MCPcopy
hub / github.com/cli/cli / ScopesResponder

Function ScopesResponder

pkg/httpmock/stub.go:251–254  ·  view source on GitHub ↗

ScopesResponder returns a response with a 200 status code and the given OAuth scopes.

(scopes string)

Source from the content-addressed store, hash-verified

249
250// ScopesResponder returns a response with a 200 status code and the given OAuth scopes.
251func ScopesResponder(scopes string) func(*http.Request) (*http.Response, error) {
252 //nolint:bodyclose
253 return StatusScopesResponder(http.StatusOK, scopes)
254}
255
256// StatusScopesResponder returns a response with the given status code and OAuth scopes.
257func StatusScopesResponder(status int, scopes string) func(*http.Request) (*http.Response, error) {

Callers 5

TestLoginFunction · 0.92
Test_loginRun_nonttyFunction · 0.92
Test_loginRun_SurveyFunction · 0.92
Test_statusRunFunction · 0.92

Calls 1

StatusScopesResponderFunction · 0.85

Tested by 5

TestLoginFunction · 0.74
Test_loginRun_nonttyFunction · 0.74
Test_loginRun_SurveyFunction · 0.74
Test_statusRunFunction · 0.74