cli / go-gh

A Go module for interacting with gh and the GitHub API from the command line.
https://pkg.go.dev/github.com/cli/go-gh/v2
MIT License
322 stars 45 forks source link

Expose a http.Client instance #15

Closed chelnak closed 2 years ago

chelnak commented 2 years ago

Closes #13

The idea behind this PR is that a developer can opt to configure another library (e.g go-github) with a http client instance that has been configured to use gh-cli auth.

chelnak commented 2 years ago

~I'm also wondering if I should move NewHttpClient from http_client.go in to http.go... it's not an interface with methods or anything so feel like it's a bit overkill having it in a new file.~

Resolved by exporting the internal method.

chelnak commented 2 years ago

@samcoe Thank you - appreciate the guidance from you both. 😄

chelnak commented 2 years ago

Hey! Is there anything more I can do for this PR?

chelnak commented 2 years ago

Thank you ❤️ !