project

package
v0.148.1 Latest Latest
Warning

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

Go to latest
Published: May 3, 2026 License: BSD-2-Clause Imports: 6 Imported by: 0

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(configOverride string) Name

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

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