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

Function newClient

example/auditlogstream/main.go:159–165  ·  view source on GitHub ↗
(token, apiURL string)

Source from the content-addressed store, hash-verified

157}
158
159func newClient(token, apiURL string) *github.Client {
160 client, err := github.NewClient(github.WithAuthToken(token), github.WithEnterpriseURLs(apiURL, apiURL))
161 if err != nil {
162 log.Fatalf("Error creating GitHub client: %v", err)
163 }
164 return client
165}
166
167func requireEnv(name string) string {
168 val := os.Getenv(name)

Callers 1

parseAndInitFunction · 0.70

Calls 3

NewClientFunction · 0.92
WithAuthTokenFunction · 0.92
WithEnterpriseURLsFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…