repo_root

package
v0.0.0-...-dbdf344 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2024 License: BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get() (string, error)

Get returns the path to the workspace's root directory.

Under Bazel, it returns the path to the runfiles directory. Test targets must include any required files under their "data" attribute for said files to be included in the runfiles directory.

Outside of Bazel, it returns the path to the repo checkout's root directory. Note that this will return an error if the CWD is not inside a checkout, so this cannot run on production servers.

func GetLocal

func GetLocal() (string, error)

GetLocal returns the path to the root of the current Git repo. Only intended to be run on a developer machine, inside a Git checkout.

Types

This section is empty.

Jump to

Keyboard shortcuts

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