docs: add a name mnemonic to every module README and the root modules table

This commit is contained in:
2026-10-11 00:26:20 +02:00
parent 5e3c552aa1
commit ca1443e9c8
25 changed files with 74 additions and 26 deletions

View File

@@ -4,6 +4,8 @@ JSON response helpers and value types that keep API bodies byte-compatible with
`import "git.golem15.com/golem15/summercms/modules/wire"`
**Name:** What goes over the wire; it keeps response bodies byte-for-byte the same as the PHP backend's.
## Overview
`wire` is the lowest layer of the HTTP stack: it decides how a Go value becomes response bytes. Its helpers reproduce what `json_encode` and Carbon produce in a WinterCMS or Laravel app (unescaped HTML characters, no trailing newline, `+00:00` timestamps, nullable booleans, `[]` rather than `null` for empty lists), so an endpoint ported from PHP returns the same body its existing clients already parse. [surf](../surf/README.md) uses it for the opaque 500 response of its panic recovery, and application handlers use it directly for their JSON responses.