rules

package
v0.0.0-...-e0b1931 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2016 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package rules provides Bazel rule generation for Go build targets.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Generator

type Generator interface {
	// Generate generates build rules for build targets in a Go package in a
	// repository.
	//
	// "rel" is a relative slash-separated path from the repostiry root
	// directory to the Go package directory. It is empty if the package
	// directory is the repository root itself.
	// "pkg" is a description about the package.
	Generate(rel string, pkg *build.Package) ([]*bzl.Rule, error)
}

Generator generates Bazel build rules for Go build targets

func NewGenerator

func NewGenerator(goPrefix string) Generator

NewGenerator returns an implementation of Generator.

"goPrefix" is the go_prefix corresponding to the repository root. See also https://github.com/bazelbuild/rules_go#go_prefix.

Jump to

Keyboard shortcuts

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