Help us shape the future of Go! Take the 2026 Go Developer Survey

ws

package
v1.30.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package ws offers functions for locating Bazel workspaces and related files.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindFile added in v1.30.0

func FindFile(startDirectory string, relativePath string) string

FindFile returns the nearest file at relativePath in startDirectory or one of its parent directories. It returns an empty string if no such file exists.

func FindWorkspaceRoot

func FindWorkspaceRoot(root string) string

FindWorkspaceRoot returns the root directory of the Bazel workspace in which root exists, if any. Defined by the presence of a file named MODULE.bazel, REPO.bazel, WORKSPACE.bazel, or WORKSPACE see https://github.com/bazelbuild/bazel/blob/7.2.1/src/main/cpp/workspace_layout.cc#L34

Types

This section is empty.

Jump to

Keyboard shortcuts

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