project

package
v0.199.12 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: BSD-2-Clause Imports: 6 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func FindRoot(ctx context.Context) (string, error)

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

func Resolve(ctx context.Context, runner subproc.Runner, configOverride string) (Name, error)

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.

func (Name) String added in v0.135.17

func (n Name) String() string

String returns the underlying string for use at boundaries (logs, exec args, etc.).

Jump to

Keyboard shortcuts

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