MCPcopy Index your code
hub / github.com/google/go-github / NewClient

Function NewClient

github/github.go:547–556  ·  view source on GitHub ↗

NewClient returns a new GitHub API client configured with the provided options. The default configuration is suitable for making unauthenticated requests to the public GitHub API. For GitHub Enterprise, use [WithEnterpriseURLs] to set the base and upload URLs. To make authenticated requests, use [

(opts ...ClientOptionsFunc)

Source from the content-addressed store, hash-verified

545// [WithTimeout] or by providing a custom [http.Client] with an appropriate
546// timeout using [WithHTTPClient].
547func NewClient(opts ...ClientOptionsFunc) (*Client, error) {
548 o := clientOptions{}
549 for _, opt := range opts {
550 if err := opt(&o); err != nil {
551 return nil, err
552 }
553 }
554
555 return newClient(o)
556}
557
558// newClient creates a new Client with the provided options. This is an internal
559// helper function that is called by [NewClient] and [Client.Clone].

Callers 15

newClientFunction · 0.92
mainFunction · 0.92
fetchTopicsFunction · 0.92
mainFunction · 0.92
fetchOrganizationsFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
mainFunction · 0.92
fetchAllUserMigrationsFunction · 0.92
mainFunction · 0.92

Calls 1

newClientFunction · 0.70

Used in the wild real call sites across dependent graphs

searching dependent graphs…