Documentation
¶
Overview ¶
Package templateresidue compares a project whose game.yaml records an origin of kind template against a bundled template and returns advisory warnings for files and metadata that are still unchanged.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Check ¶
func Check(fsys fs.FS, templates []Template) []assetcheck.Problem
Check returns advisory warnings for a project in fsys whose game.yaml records an origin of kind template matching an entry in templates with non-nil Files: rule and data files still byte-identical to the template's, a name or window title still the template's, and a README.md or CREDITS.md still the template's. origin.keep leaves out the categories it names. A directory without a readable game.yaml, or with an origin of another kind or an unresolved or conflicting template, gets none.
func Kind ¶
Kind returns the origin.keep category a template file counts toward ("rules" or "data"), or "" for a file the comparison leaves out: files game new renders from the project's name and module, project and build settings, the game brief, the template manifest, editor debug configuration under .vscode, CI workflows under .github, tests, playtest recordings and touch layouts.
Types ¶
type Template ¶
type Template struct {
// Name is the template's name (origin.path), such as "cards2d".
Name string
// Module is the template's Go module path (origin.source), such as "github.com/nsgo-dev/game/template/cards2d".
Module string
// Files holds the template's files at its root; nil disables residue comparison for this template.
Files fs.FS
}
Template describes one bundled project template that a project's origin may refer to.