importers

package
v0.0.0-...-b52e947 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package importers provides functionality to track down packages depending on certain package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoDoc

type GoDoc struct {
	// URL contains the url used to extract the information from.
	// If empty it'll use http://godoc.org
	URL string
	// Path containing the dependents we want to list.
	// e.g: Path: "github.com/ernesto-jimenez" will only return dependents within
	// github.com/ernesto-jimenez
	Path string
}

GoDoc is used to extract importers information from the godoc website. By default information is extracted from http://godoc.org

func (*GoDoc) List

func (g *GoDoc) List(pkg string, recursive bool) ([]string, error)

List looks for dependent packages tracked by godoc.org

type Lister

type Lister interface {
	List(pkg string, recursive bool) ([]string, error)
}

Lister defines the interface common to all importers

type Local

type Local struct {
	// Path to dependents in.
	// By default it will search in all $GOPATH src folders
	Path string
}

Local dependents matcher

func (*Local) List

func (g *Local) List(pkg string, recursive bool) ([]string, error)

List looks for all dependent packages in the specified Path

Jump to

Keyboard shortcuts

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