Documentation
¶
Overview ¶
Package projects maps a bare project name to a checkout directory, for `-C r3` run from somewhere else entirely.
Off unless asked for. GH-20 fenced the binary as answering for the repo it runs in and never walking the filesystem looking for others, and a basename search over projects is exactly that walk. The fence holds because the search is opt-in: without F10_ROOTS nothing is globbed and nothing is scanned, and a bare name says so rather than guessing. Setting the variable - one line in a shell profile, no file for f10 to own - is what turns multi-project lookup on.
A path never comes here. `-C ../r3` needs no lookup at all, so it works whether or not the variable is set.
Index ¶
Constants ¶
const RootsEnv = "F10_ROOTS"
RootsEnv holds a colon-separated list of globs, PATH-style, each expanding to candidate checkout directories: `~/code/github.com/*/*`.
Variables ¶
var ErrDisabled = errors.New("finding a project by name needs " + RootsEnv +
" set to a colon-separated list of globs (for example ~/code/github.com/*/*); a path such as -C ../r3 always works")
ErrDisabled means a name was given while name lookup is off.
Functions ¶
func Find ¶ added in v0.26.0
Find returns the one checkout named name under the configured roots. Nothing found and more than one found are both errors that name what was searched: a wrong guess here would run a command against the wrong repo.
Types ¶
This section is empty.