MCPcopy Index your code
hub / github.com/cli/cli / NewClient

Function NewClient

pkg/cmd/project/shared/queries/queries.go:18–28  ·  view source on GitHub ↗
(httpClient *http.Client, hostname string, ios *iostreams.IOStreams)

Source from the content-addressed store, hash-verified

16)
17
18func NewClient(httpClient *http.Client, hostname string, ios *iostreams.IOStreams) *Client {
19 apiClient := &hostScopedClient{
20 hostname: hostname,
21 Client: api.NewClientFromHTTP(httpClient),
22 }
23 return &Client{
24 apiClient: apiClient,
25 io: ios,
26 prompter: prompter.New("", ios),
27 }
28}
29
30// TestClientOpt is a test option for the test client.
31type TestClientOpt func(*Client)

Calls 2

NewClientFromHTTPFunction · 0.92
NewFunction · 0.92