MCPcopy Create free account
hub / github.com/cli/cli / NewClient

Function NewClient

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

Source from the content-addressed store, hash-verified

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

Calls 2

NewClientFromHTTPFunction · 0.92
NewFunction · 0.92