Documentation
¶
Index ¶
- func CWDIsDirty() (bool, error)
- func ChangedFiles(commitRange string, basePkg string) ([]string, error)
- func ChangedPackages(changedFiles []string) []string
- func Checkout(ref string) (string, error)
- func CurrentSHA1() (string, error)
- func MatchesAny(input string, patterns []string) bool
- type DanglingDeleteError
- type ImportGraph
- type ImportSet
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CWDIsDirty ¶
CWDIsDirty returns whether the current directory is dirty.
func ChangedFiles ¶
ChangedFiles returns the files changed in the provided commit range. NB: this returns relative paths.
func ChangedPackages ¶
ChangedPackages returns all changed packages. NB: changedFiles are expected to be relative paths.
func MatchesAny ¶
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 ¶
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.