Skip to content

v0.1.1 - Bug Fix Release

Choose a tag to compare

@jackielii jackielii released this 31 Oct 19:41
· 143 commits to main since this release

Structpages v0.1.1

This is a bug fix release addressing a critical panic in v0.1.0.

Bug Fixes

  • Fixed panic with bound methods in RenderComponent: Resolved a critical bug where using bound methods (instance.Method) with arguments in RenderComponent() would cause a panic with the error reflect: Call with too few input arguments. The issue was in the bound method detection logic which only recognized methods with zero arguments.

Changes

  • Fixed extractMethodInfo() to properly detect bound methods regardless of argument count
  • Added better error handling for callable argument mismatches
  • Added regression test TestHandleRenderComponentError_BoundMethodWithArgs
  • Improved test coverage to 98.6%

Affected Usage Pattern

This bug affected code like:

instance := MyPage{}
boundMethod := instance.ComponentWithArgs
return RenderComponent(boundMethod, "arg1", 42)  // Would panic in v0.1.0

Installation

go get github.com/jackielii/structpages@v0.1.1

Full Changelog

Full Changelog: v0.1.0...v0.1.1