Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindGoImport ¶
FindGoImport searches for a `go-import` through the contents of a reader, capturing the `go-import` content's if found.
Ref: https://golang.org/cmd/go/#hdr-Download_and_install_packages_and_dependencies
Types ¶
type GoImport ¶
GoImport is a representation of the contents that get parsed from a `go-import` meta element in an HTML page.
For instance:
<meta name="go-import" content="gopkg.in/yaml.v2 git https://gopkg.in/yaml.v2" --> what GoImport represents >
func ParseGoImport ¶
ParseGoImport parses the value associated with the content tag of a `go-import` header meta element.
type Location ¶
func Resolve ¶
Resolve retrieves a dependency's source code location from a dependency line, eventually performing an underlying HTTP request for retriving the `go-import` tag if needed.
func RetrieveLocationFromGoImport ¶
RetrieveLocationFromGoImport retrieves import location information by performing a request for the dependency website and searching for a `go-import` tag.
func RetrieveLocationFromKnownHostingWebsite ¶
func RetrieveLocationFromKnownHostingWebsite(address string) (loc Location, unknownHost bool, err error)
RetrieveLocationFromKnownHostingWebsite tries to retrieve a Location for a given dependency from a known set of rules for a common set of hosting websites.