Documentation
¶
Overview ¶
Package scaffold holds shared codegen output helpers used by the apic code generators under helpers/* (wsgen, mcpgen, fn, noop, httpgentest). QG-025: it removes the duplicated "format the assembled source, then write it to disk" logic each helper previously carried inline.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Format ¶
Format formats src with goimports grouping and returns the canonical bytes. QG-037/QG-015/QG-075: all generated Go output must be byte-stable under BOTH `gofmt -l` and `goimports -l`. go/format.Source only gofmt-sorts within a single import block and never regroups stdlib vs third-party; imports.Process with FormatOnly:true adds the canonical grouping on top of gofmt formatting without ever adding or deleting an import (mirrors cmd/apic/templates.go renderToFile). name is used only for error context. A formatting error is returned with no bytes so a malformed emission fails loud rather than producing an un-formattable file.
Types ¶
This section is empty.