parser

package
v0.0.0-...-9d46a64 Latest Latest
Warning

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

Go to latest
Published: Jun 23, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo

func CloneRepo(repo, tag string) (string, error)

CloneRepo clones the given git repository and checks out the given tag into a temporary directory whose path is returned. The caller is reponsible for deleting the temp directory if needed.

Types

type Repo

type Repo struct {
	Base     string
	Packages map[string]*packages.Package
}

Repo contains the result of parsing a whole repository.

func CloneAndParse

func CloneAndParse(repo, tag string) (*Repo, error)

CloneAndParse clones the a repo into a temporary directory, checks out the given tag, and parses its contents. The temporary directory is removed automatically.

func ParseRepo

func ParseRepo(dir string) (*Repo, error)

ParseRepo fetches the given repository at the specified tag, parses its contents, and returns the corresponding Repo.

Jump to

Keyboard shortcuts

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