pip compatible server to serve Python packages out of GitHub
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

28 lines
605 B

package main
import (
"fmt"
"github.com/google/go-github/github"
)
func main() {
client := github.NewClient(nil)
fmt.Println("Recently updated repositories owned by user willnorris:")
opt := &github.RepositoryListOptions{Type: "owner", Sort: "updated", Direction: "desc"}
repos, err := client.Repositories.List("willnorris", opt)
if err != nil {
fmt.Printf("error: %v\n\n", err)
} else {
fmt.Printf("%#v\n\n", repos)
}
rate, err := client.RateLimit()
if err != nil {
fmt.Printf("Error fetching rate limit: %#v\n\n", err)
} else {
fmt.Printf("API Rate Limit: %#v\n\n", rate)
}
}