Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ImportPathToBazelRepoName ¶
ImportPathToBazelRepoName converts a Go import path into a bazel repo name following the guidelines in http://bazel.io/docs/be/functions.html#workspace
func IsStandard ¶ added in v0.7.0
IsStandard returns whether a package is in the standard library.
Types ¶
type Labeler ¶ added in v0.5.4
type Labeler interface { LibraryLabel(rel string) Label TestLabel(rel string, isXTest bool) Label BinaryLabel(rel string) Label ProtoLabel(rel, name string) Label GoProtoLabel(rel, name string) Label }
Labeler generates Bazel labels for rules, based on their locations within the repository.
func NewLabeler ¶ added in v0.5.4
type Resolver ¶ added in v0.5.4
type Resolver struct {
// contains filtered or unexported fields
}
Resolver resolves import strings in source files (import paths in Go, import statements in protos) into Bazel labels. TODO(#859): imports are currently resolved by guessing a label based on the name. We should be smarter about this and build a table mapping import paths to labels that we can use to cross-reference.
func (*Resolver) ResolveGo ¶ added in v0.6.0
ResolveGo resolves an import path from a Go source file to a label. pkgRel is the path to the Go package relative to the repository root; it is used to resolve relative imports.
func (*Resolver) ResolveGoProto ¶ added in v0.6.0
ResolveGoProto resolves an import statement in a .proto file to a label for a go_library rule that embeds the corresponding go_proto_library.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
internal
|
|
gen_std_package_list
gen_std_package_list reads a text file containing a list of packages (one per line) and generates a .go file containing a set of package names.
|
gen_std_package_list reads a text file containing a list of packages (one per line) and generates a .go file containing a set of package names. |