go-issue-mirror icon indicating copy to clipboard operation
go-issue-mirror copied to clipboard

[old] precursor to golang.org/x/build/maintner/godata

Go Issue Tracker Mirror

This repo is a mirror of the Go Issue Tracker.

The goal is to permit offline access and more powerful searches. It also doesn't take any quota to query this way.

To use it:

package main

import (
	"log"

	"github.com/bradfitz/go-issue-mirror/issues"
	"github.com/google/go-github/github"
)

func main() {
	root, err := issues.Open()
	if err != nil {
		log.Fatal(err)
	}
	is, err := root.Issue(1234)
	log.Printf("Issue: %#v, %v", is, err)

	c, err := root.IssueComment(1234, 66053086)
	log.Printf("Comment: %#v, %v", c, err)

	root.ForeachIssue(func(is *github.Issue) error {
		log.Printf("Issue %d: %v", *is.Number, *is.Title)
		root.ForeachIssueComment(*is.Number, func(c *github.IssueComment) error {
			log.Printf("  comment from %v at %v", *c.User.Login, *c.CreatedAt)
			return nil
		})
		return nil
	})
}

There is also a program that will display the issues in your browser. It will work when offline. Install it with go get -u github.com/bradfitz/go-issue-mirror/cmd/servegoissues, then run servegoissues and navigate to http://localhost:8080/ in your browser.