Skip to content

v0.5.1

Choose a tag to compare

@sourcehawk sourcehawk released this 30 Mar 11:43
· 67 commits to main since this release
53c6da3

This release adds WrapGuard and WrapExtractor generic helpers that eliminate repetitive pointer-to-value callback wrapping across all primitive builders.

Added

  • generic.WrapGuard: Converts a value-receiver guard callback into a pointer-receiver callback for the generic builder layer. Handles nil passthrough.
  • generic.WrapExtractor: Converts a value-receiver data extractor callback into a pointer-receiver callback for the generic builder layer. Handles nil passthrough.

Changed

  • All 25 primitive builders (21 typed + 4 unstructured) now use WrapGuard and WrapExtractor instead of inline nil-check and closure wrapping in their WithGuard and WithDataExtractor methods.

Docs

  • Added Guardable to the custom resource and unstructured primitive documentation.
  • Rewrote the custom resource mutator example to properly demonstrate NextFeature and per-feature plan scoping.
  • Updated the custom resource builder example to use value-type callbacks with WrapGuard and WrapExtractor.