Documentation
¶
Overview ¶
Package manifest reads and writes the .awf/awf.lock and detects drift between rendered output and its sources.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteFileAtomic ¶ added in v0.11.0
WriteFileAtomic writes data to path via a same-directory temp file renamed into place, so a crash can never leave a truncated file at path. Mode is 0o644 (CreateTemp's 0o600 is widened before the rename). On error the temp file is best-effort removed. Rename-only durability — no fsync — per ADR-0076 Decision 1; Go's os.Rename replaces an existing destination on every supported OS including Windows. invariant: lock-atomic-save
Types ¶
type Lock ¶
type Lock struct {
AWFVersion string `json:"awfVersion"`
SchemaVersion int `json:"schemaVersion"`
Files map[string]Entry `json:"files"`
}
func LoadOptional ¶ added in v0.11.0
LoadOptional is the corrupt-lock policy choke point (ADR-0076 Decision 2): a missing lock reports found=false with no error so callers keep their no-lock semantics; a present-but-unreadable lock is a hard error carrying the one recovery hint. invariant: corrupt-lock-refuses