go-github is a Go client library for accessing the GitHub REST API v3.
The library solves the problem of integrating GitHub API functionality into Go applications by providing a structured client that divides the API into logical service chunks corresponding to the GitHub API documentation. Developers construct a new GitHub client and use its various services to access different parts of the API, with support for optional parameters on API methods and context-based cancellation and deadlines.
Adopters should choose this library if they need REST API access rather than GraphQL functionality, for which the README recommends an alternative library. The tool suits any Go project requiring programmatic interaction with GitHub repositories, issues, pull requests, and other GitHub resources. Authentication is straightforward through OAuth tokens via the WithAuthToken option, with support for more advanced scenarios through custom HTTP transports or clients, and specific support for GitHub Apps authentication through external packages. The library follows Go's version support policy, maintaining compatibility with the latest two major releases of Go.
The project maintains a substantial base of adopters, as evidenced by the fact that almost all open issues are raised by outside users rather than the core team. Maintainers typically respond to new issues and pull requests within hours. Work in the issue tracker is dominated by enhancement requests, breaking API changes, and bug reports.