paths

package
v0.27.0 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package paths resolves manifest paths within a project root.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JoinWithin added in v0.6.2

func JoinWithin(root, boundary, relative string) (string, error)

JoinWithin resolves a relative path while keeping it inside boundary.

Types

type Resolved

type Resolved struct {
	// Root is the absolute project root directory (the manifest's
	// directory).
	Root string

	// Entry is the absolute path to manifest.Entry, or "" if unset.
	Entry string

	// Output is the absolute path to manifest.Output, or "" if unset.
	Output string

	// IncludeRoots are de-duplicated and retain declaration order.
	IncludeRoots []string

	// GeneratedFiles lists known generated project files.
	GeneratedFiles []string
}

Resolved contains normalized absolute project paths.

func Resolve

func Resolve(root string, m *manifest.Manifest) (Resolved, error)

Resolve computes Resolved for m rooted at root, which must already be an absolute path (typically workspace.Root.Dir).

func ResolveWithin added in v0.6.0

func ResolveWithin(root, boundary string, m *manifest.Manifest) (Resolved, error)

ResolveWithin allows entry and output paths inside boundary.

Jump to

Keyboard shortcuts

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