storelayout

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2026 License: MIT Imports: 6 Imported by: ? 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 storelayout describes how an application locates a manifest inside a package. Paths are relative to the package root, including inside archives.

Index

Constants

View Source
const (
	// LegacyManifest is the filename used by callers without an explicit layout.
	LegacyManifest = "plugin.json"
	// ExtManifest is the filename used by Ext-managed packages.
	ExtManifest = "ext.json"
)

Variables

This section is empty.

Functions

func Reserves

func Reserves(manifestPath, artifactPath string, tree bool) bool

Reserves reports whether an artifact uses the selected manifest itself, or includes it as a member of an artifact tree.

Types

type Layout

type Layout struct {
	ManifestPath string `json:"manifest_path"`
	FallbackPath string `json:"fallback_path,omitempty"`
}

Layout is an application's package layout. FallbackPath is read only when ManifestPath is absent. An invalid or unreadable primary never falls back.

func Ext

func Ext() Layout

Ext returns the layout of Ext installations and their historical packages.

func (Layout) Locate

func (l Layout) Locate(root string) (string, error)

Locate returns the selected package-relative path, refusing links and special files. Callers must protect the source while using the result.

func (Layout) Normalize

func (l Layout) Normalize() (Layout, error)

Normalize validates paths and provides the legacy convention for a zero layout.

Jump to

Keyboard shortcuts

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