resolve

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ImportPathToBazelRepoName

func ImportPathToBazelRepoName(importpath string) string

ImportPathToBazelRepoName converts a Go import path into a bazel repo name following the guidelines in http://bazel.io/docs/be/functions.html#workspace

Types

type Label

type Label struct {
	Repo, Pkg, Name string
	Relative        bool
}

A Label represents a label of a build target in Bazel.

func (Label) String

func (l Label) String() string

type Labeler added in v0.5.4

type Labeler interface {
	LibraryLabel(rel string) Label
	TestLabel(rel string, isXTest bool) Label
	BinaryLabel(rel string) Label
}

Labeler generates Bazel labels for rules, based on their locations within the repository.

func NewLabeler added in v0.5.4

func NewLabeler(c *config.Config) Labeler

type Resolver added in v0.5.4

type Resolver interface {
	// Resolve resolves a Go importpath "importpath" into a Label. "importpath"
	// must not be relative. The returned Label will never be relative.
	Resolve(importpath string) (Label, error)
}

A Resolver resolves a Go importpath into a label in Bazel.

func NewResolver added in v0.5.4

func NewResolver(c *config.Config, l Labeler) Resolver

Jump to

Keyboard shortcuts

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