github

package
v0.0.0-...-e36ecd4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 15, 2013 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package github finds package paths on GitHub for the goimport package.

goimport.Handle(otherHandler, github.Packages{
	User:             "someuser",
	FilterByHomepage: "^(http://)?example.com/",
})

With the above, goimport.Handle will redirect `go get` requests of example.com/somerepo to github.com/someuser/somerepo for all GitHub repos that are owned by user someuser and with a homepage at example.com. For any paths that do not match a package, requests fall back to otherHandler.

For each repository, any directories that have .go files is considered a package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Packages

type Packages struct {
	User             string
	PollInterval     time.Duration // default is 1 hour
	FilterByName     string
	FilterByHomepage string
	// contains filtered or unexported fields
}

Packages defines a GitHub package finder for j4k.co/goimport. GitHub is polled every hour for changes. API request errors are logged to stderr.

func (Packages) FindPackages

func (p Packages) FindPackages(dest goimport.PackageSetter)

FindPackages is called by goimport.Handler when setting up a list of package paths.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL