assetusage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package assetusage finds statically referenced generated assets in cartridge source.

Index

Constants

View Source
const (
	ReasonTypedReference = "typed reference"
	ReasonStaticName     = "static logical name"
	ReasonDynamicLookup  = "dynamic texture lookup retains the project texture scope"
	ReasonAnalysisFailed = "type analysis was incomplete; retaining the project texture scope"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Result

type Result struct {
	Live       map[string]string
	KeepAll    bool
	Diagnostic string
}

Result describes the conservative live texture set.

func Analyze

func Analyze(directory, modulePath string, names []string) Result

Analyze type-checks the generated engine package together with project source. An analysis uncertainty retains all assets instead of risking a false strip.

func AnalyzeUI

func AnalyzeUI(directory, modulePath string, names []string) Result

AnalyzeUI retains named UI references and conservatively retains the complete UI scope when a lookup is dynamic, a method escapes, or typing is incomplete.

func AnalyzeUIViews

func AnalyzeUIViews(directory, modulePath string, names []string, views map[string]string) Result

AnalyzeUIViews also retains assets reached through generated component methods.

Jump to

Keyboard shortcuts

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