lib

package
v0.0.0-...-edd1bdd Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CWDIsDirty

func CWDIsDirty() (bool, error)

CWDIsDirty returns whether the current directory is dirty.

func ChangedFiles

func ChangedFiles(commitRange string, basePkg string) ([]string, error)

ChangedFiles returns the files changed in the provided commit range. NB: this returns relative paths.

func ChangedPackages

func ChangedPackages(changedFiles []string) []string

ChangedPackages returns all changed packages. NB: changedFiles are expected to be relative paths.

func Checkout

func Checkout(ref string) (string, error)

Checkout the specified git sha1.

func CurrentSHA1

func CurrentSHA1() (string, error)

CurrentSHA1 returns the SHA1 of HEAD.

func MatchesAny

func MatchesAny(input string, patterns []string) bool

MatchesAny returns if input matches any of the patterns specified.

Types

type DanglingDeleteError

type DanglingDeleteError struct {
	// contains filtered or unexported fields
}

DanglingDeleteError indicates an otherwise un-imported package was deleted from the repository.

func (DanglingDeleteError) Error

func (d DanglingDeleteError) Error() string

type ImportGraph

type ImportGraph map[string]ImportSet

ImportGraph is a map from a Go package, `p` to the set of all packages which import `p`.

func NewImportGraph

func NewImportGraph(ctx *build.Context, basePkg string) (ImportGraph, error)

func (ImportGraph) Closure

func (g ImportGraph) Closure(paths ...string) (ImportSet, error)

Closure return the transitive closure of all packages reachable by starting at the provided paths in the ImportGraph.

func (ImportGraph) String

func (g ImportGraph) String() string

String representation of the Import Graph.

func (ImportGraph) Vertices

func (g ImportGraph) Vertices() ImportSet

Vertices returns all known vertices in the graph.

type ImportSet

type ImportSet map[string]struct{}

ImportSet is a set of imports.

Jump to

Keyboard shortcuts

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