bazel

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GoBazelDependencies added in v1.0.26

func GoBazelDependencies(target string) (graph.Deps, error)

GoBazelDependencies parses a Bazel file set up to exclusively handle go_repository blocks.

Types

type Query added in v1.0.19

type Query struct {
	Rules []Rule `xml:"rule"`
}

Query is the xml result of a Bazel query.

type Rule added in v1.0.19

type Rule struct {
	Class    string   `xml:"class,attr"`
	Name     string   `xml:"name,attr"`
	Location string   `xml:"location,attr"`
	Values   []Values `xml:"string"`
}

Rule maps to the xml representation of a Bazel rule https://docs.bazel.build/versions/2.0.0/skylark/rules.html.

type Shell added in v1.0.19

type Shell struct {
	Cmd func(...string) (string, *errors.Error)
}

Shell contains a command which returns bazel query output.

func ExecutableShell added in v1.0.19

func ExecutableShell(binary, dir string) Shell

ExecutableShell creates a Shell which shells out to the supplied binary to generate values to return.

func (Shell) TargetDependencies added in v1.0.19

func (s Shell) TargetDependencies(target string, upload bool) (graph.Deps, error)

TargetDependencies returns a dependency graph corresponding to a bazel target.

type Values added in v1.0.19

type Values struct {
	Key   string `xml:"name,attr"`
	Value string `xml:"value,attr"`
}

Values is the list of string values present in a rule. They function as a key value map.

Jump to

Keyboard shortcuts

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