Skip to content

Conversation

@jonbodner
Copy link
Owner

No description provided.

jonbodner and others added 3 commits February 12, 2026 15:02
Tests cover: nil rows panic in handleMapping (#18), nil map value
panic in setupDynamicQueries (#19), fromPtr(nil) panic (#20),
unbounded slice index panic in Extract (#21), and Build() setting
embedded struct fields despite errors (#22). All panic-related tests
currently fail, confirming the bugs exist.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Bug fixes:
- Replace unsafe.Pointer(nil) with reflect.Zero(reflect.PointerTo()) (#17/#8)
- Add nil guard before defer rows.Close() in handleMapping (#18)
- Handle nil types from reflect.TypeOf(nil) in downstream code (#19)
- Add nil guard in fromPtr and fromPtrType (#20)
- Add bounds checking for slice index in Extract (#21)
- Only set embedded struct field in Build() when inner Build succeeds (#22)

Modernization:
- Use reflect.TypeFor[] instead of reflect.TypeOf((*T)(nil)).Elem()
- Refactor if/else-if chain to switch in MakeBuilder
- Use reflect.Pointer instead of reflect.Ptr
- Move errType to package-level var
- Update MODERNIZATION.md to mark completed items

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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