Skip to content

Enhanced WithGoFunction with support of any function signature

Latest
Compare
Choose a tag to compare
@aleybovich aleybovich released this 07 Oct 17:48

What's New

  • Improved Function Integration: WithGoFunction now supports any function signature, allowing for seamless integration of custom Go functions without the need for wrappers or specific types.

Breaking Changes

  • Removed GoFuncWrapper: This utility is no longer necessary due to the enhanced flexibility of WithGoFunction.

Improvements

  • Simplified API: Users can now directly pass their custom functions to WithGoFunction without modification.
  • Increased Flexibility: The engine now accommodates a wider range of function signatures, making it easier to extend functionality.

Upgrading

To upgrade, simply update your import to the latest version. If you were using GoFuncWrapper, you can now remove it and pass your functions directly to WithGoFunction.

Example:

// Old way
WithGoFunction("myFunc", GoFuncWrapper(myFunc))

// New way
WithGoFunction("myFunc", myFunc)