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.