project

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 6 Imported by: 0 modules, 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 detects the host project: its root, its Git repository, candidate source documents and GTT namespace collisions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Documents

func Documents(root string, skip func(rel string) bool) []string

Documents lists candidate source documents: files at the project root and one level inside the conventional directories. skip holds paths owned by GTT (from the Bootstrap). Candidates are observations; which one is authoritative is the human's decision.

Types

type Detection

type Detection struct {
	Root      string `json:"root"`
	GitRoot   string `json:"git_root,omitempty"`
	Basis     string `json:"basis"` // gtt | git | cwd
	Confident bool   `json:"confident"`
}

Detection is what the CLI found about where it is running.

func Detect

func Detect(ctx context.Context, git ports.Git, installed func(string) bool, start string) Detection

Detect finds the project root: the nearest ancestor that holds GTT, else the Git repository root, else the working directory (not confident).

type Git

type Git struct{ Runner ports.Runner }

Git is the read-only Git adapter.

func (Git) Available

func (g Git) Available() bool

Available reports whether git is on PATH.

func (Git) Root

func (g Git) Root(ctx context.Context, dir string) (string, bool)

Root returns the repository root containing dir.

Jump to

Keyboard shortcuts

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