Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type preservation for nested interface pointers #439

Merged
merged 2 commits into from
Feb 20, 2025

Conversation

wesen
Copy link
Collaborator

@wesen wesen commented Feb 20, 2025

Fixes issues with type handling when dealing with nested interface{} and pointer
types by:

  • Modify StripInterface to preserve pointer types while stripping interface wrappers
  • Add NormalizeValue function to handle type comparison and normalization
  • Fix parameter validation to properly handle object lists

Key changes:

  • StripInterface now returns *T instead of T for pointer types
  • Object lists are properly typed as []map[string]interface{}
  • Added value normalization for consistent comparisons
  • Better handling of nil values and defaults

The changes ensure proper type preservation when dealing with interface{} wrapped
pointer types, fixing several edge cases around parameter handling and validation.

@wesen wesen merged commit 74539cd into go-go-golems:main Feb 20, 2025
2 checks passed
@wesen wesen deleted the bug/fix-strip-interface branch February 20, 2025 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant