Documentation
¶
Overview ¶
Package nativego is the native-Go extbench fixture. It registers a single `validate` function under the "validate-email" extension name, matching the shared semantics implemented identically across all 5 runtime fixtures (see goja-js/validate.js for the canonical reference):
in: {"email": "Foo@Example.COM ", "age": 25}
ok: {"ok": true, "email": "foo@example.com", "age": 25}
err: {"ok": false, "error": "input must be an object"}
err: {"ok": false, "error": "email required"}
err: {"ok": false, "error": "age out of range"}
err: {"ok": false, "error": "email shape"}
err: {"ok": false, "error": "email domain"}
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Validate ¶
Validate is the exported alias of the unexported validate fn. It exists so other test packages (e.g. extbench scale_test.go) can register the same handler under additional extension names without re-implementing the logic. The init() registration below is the only call site we ship for production use.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.