workspace

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package workspace finds Pawn project roots.

Index

Constants

View Source
const (
	ManifestJSON = "pawn.json"
	ManifestYAML = "pawn.yaml"
)

ManifestJSON and ManifestYAML are supported manifest names.

Variables

View Source
var ErrNotFound = errors.New("workspace: no pawn.json or pawn.yaml found")

ErrNotFound is returned by FindRoot when no manifest is found between start and the filesystem root.

Functions

This section is empty.

Types

type Root

type Root struct {
	Dir          string // Dir is the absolute, slash-separated directory containing the manifest.
	ManifestPath string // ManifestPath is the absolute, slash-separated path to the manifest file that was found.
	ManifestName string // ManifestName is the base filename of the manifest that was found
}

Root identifies a discovered project root.

func FindRoot

func FindRoot(fsys fsx.FS, start string) (Root, error)

FindRoot walks upward from an absolute file or directory path.

Jump to

Keyboard shortcuts

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