https://github.com/gardenbed/go-github
The Simple Go Client for GitHub API v3
https://github.com/gardenbed/go-github
api client github go golang rest
Last synced: 5 months ago
JSON representation
The Simple Go Client for GitHub API v3
- Host: GitHub
- URL: https://github.com/gardenbed/go-github
- Owner: gardenbed
- License: isc
- Created: 2021-09-14T15:50:31.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2025-10-16T14:05:21.000Z (8 months ago)
- Last Synced: 2025-10-17T17:13:56.185Z (8 months ago)
- Topics: api, client, github, go, golang, rest
- Language: Go
- Homepage:
- Size: 77.1 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
[![Go Doc][godoc-image]][godoc-url]
[![CodeQL][codeql-image]][codeql-url]
[![Build Status][workflow-image]][workflow-url]
[![Go Report Card][goreport-image]][goreport-url]
[![Test Coverage][codecov-image]][codecov-url]
# go-github
A simple Go client for [GitHub API v3](https://docs.github.com/rest).
## Quick Start
You can find more examples [here](./example).
```go
package main
import (
"context"
"fmt"
"github.com/gardenbed/go-github"
)
func main() {
client := github.NewClient("")
commits, resp, err := client.Repo("octocat", "Hello-World").Commits(context.Background(), 50, 1)
if err != nil {
panic(err)
}
fmt.Printf("Pages: %+v\n", resp.Pages)
fmt.Printf("Rate: %+v\n\n", resp.Rate)
for _, commit := range commits {
fmt.Printf("%s\n", commit.SHA)
}
}
```
[godoc-url]: https://pkg.go.dev/github.com/gardenbed/go-github
[godoc-image]: https://pkg.go.dev/badge/github.com/gardenbed/go-github
[codeql-url]: https://github.com/gardenbed/go-github/actions/workflows/github-code-scanning/codeql
[codeql-image]: https://github.com/gardenbed/go-github/workflows/CodeQL/badge.svg
[workflow-url]: https://github.com/gardenbed/go-github/actions
[workflow-image]: https://github.com/gardenbed/go-github/workflows/Go/badge.svg
[goreport-url]: https://goreportcard.com/report/github.com/gardenbed/go-github
[goreport-image]: https://goreportcard.com/badge/github.com/gardenbed/go-github
[codecov-url]: https://codecov.io/gh/gardenbed/go-github
[codecov-image]: https://codecov.io/gh/gardenbed/go-github/branch/main/graph/badge.svg