Categorygithub.com/gardenbed/go-github
repositorypackage
0.1.1
Repository: https://github.com/gardenbed/go-github.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# README

Go Doc Build Status Go Report Card Test Coverage

go-github

A simple Go client for GitHub API v3.

Quick Start

You can find more examples here.

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)
  }
}