feat(adapter): registry with detect filtering and duplicate guard

This commit is contained in:
2026-05-23 02:48:31 +01:00
parent 6ab8d149e1
commit 95962bdf9a
12 changed files with 389 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
// Package render holds deterministic format marshallers.
package render
import (
"bytes"
"encoding/json"
)
func JSON(v any) ([]byte, error) {
var buf bytes.Buffer
enc := json.NewEncoder(&buf)
enc.SetIndent("", " ")
enc.SetEscapeHTML(false)
if err := enc.Encode(v); err != nil {
return nil, err
}
return buf.Bytes(), nil
}