Documentation
¶
Overview ¶
Package project defines project-level types and naming.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FindRoot ¶ added in v0.147.0
FindRoot walks up the directory tree from the current working directory, looking for a .dark-factory.yaml file. It stops at $HOME and never ascends above it. Returns the directory that contains .dark-factory.yaml.
If no .dark-factory.yaml is found in any ancestor up to $HOME, it returns:
"not a dark-factory project: no .dark-factory.yaml in <cwd> or any parent directory"
Types ¶
type Name ¶
type Name string
Name is a typed alias for the resolved project name. Construct via Resolve.
func Resolve ¶ added in v0.135.17
Resolve resolves the project name using the fallback chain: 1. Config override (if non-empty) 2. Git repository root directory name 3. Git remote repo name (origin URL → extract repo name) 4. Working directory name 5. Literal "dark-factory"
Returns an error only when ctx is cancelled or timed out during a git probe. A git command merely failing (not in a repo) is not an error — it falls through.