Back to godoc.org
bldy.build/build / workspace

Package workspace

v0.0.0-...-d04b29a
Latest Go to latest

The latest major version is .

Published: Oct 2, 2018 | License: BSD-3-Clause | Module: bldy.build/build

Index

Constants

const (
	// BUILDFILE is the name of the file that keeps targets
	BUILDFILE = "BUILD"
)

Variables

var (
	// ErrNotAWorkspace is returned when the given URL is not a workspace
	ErrNotAWorkspace = errors.New("workspace: given url is not a workspace")
	// ErrNotAbsolute is returned when a url is not absolute
	ErrNotAbsolute = errors.New("workspace: local urls should be absolute paths")
)

func FindWorkspace

func FindWorkspace(a string, stat Stat) (string, error)

FindWorkspace looks for recursively for WORKSPACE file in each parent directory. If it fails to find anything it will return the fist directory with .git

A workspace is a directory on your filesystem that contains the source files for the software you want to build, as well as symbolic links to directories that contain the build outputs. Each workspace directory has a text file named WORKSPACE which may be empty, or may contain references to external dependencies required to build the outputs. https://docs.bazel.build/versions/master/build-ref.html#workspace

type Stat

type Stat func(string) (os.FileInfo, error)

Stat checks if a file exists or not in a workspace

type Workspace

type Workspace interface {
	AbsPath() string
	Buildfile(label.Label) string
	File(label.Label) string
	PackageDir(label.Label) string
	LoadBuildfile(label.Label) ([]byte, error)
}

Workspace is a Bazel workspace https://docs.bazel.build/versions/master/be/workspace.html

func New

func New(a string) (Workspace, error)

New given a URL returns a workspace

Package Files

  • local.go
  • workspace.go
Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier