Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document that Rlocation can return relative paths #3377

Merged
merged 1 commit into from
Dec 4, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions go/runfiles/runfiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,14 @@ func New(opts ...Option) (*Runfiles, error) {
return nil, errors.New("runfiles: no runfiles found")
}

// Rlocation returns the absolute path name of a runfile. The runfile name must be a
// runfile-root relative path, using the slash (not backslash) as directory separator.
// It is typically of the form "repo/path/to/pkg/file".
// If r is the zero Runfiles object, Rlocation always returns an error. If the runfiles
// manifest maps s to an empty name (indicating an empty runfile not present in the
// filesystem), Rlocation returns an error that wraps ErrEmpty.
// Rlocation returns the (relative or absolute) path name of a runfile.
// The runfile name must be a runfile-root relative path, using the slash (not
// backslash) as directory separator. It is typically of the form
// "repo/path/to/pkg/file".
//
// If r is the zero Runfiles object, Rlocation always returns an error. If the
// runfiles manifest maps s to an empty name (indicating an empty runfile not
// present in the filesystem), Rlocation returns an error that wraps ErrEmpty.
//
// See section “Library interface” in
// https://docs.google.com/document/d/e/2PACX-1vSDIrFnFvEYhKsCMdGdD40wZRBX3m3aZ5HhVj4CtHPmiXKDCxioTUbYsDydjKtFDAzER5eg7OjJWs3V/pub.
Expand Down