Skip to content

struct: map slices of struct pointers - #396

Merged
unknwon merged 1 commit into
go-ini:v1from
team-humaki:mapto-slice-struct-pointers
Nov 11, 2026
Merged

unknwon merged 1 commit into
go-ini:v1from
team-humaki:mapto-slice-struct-pointers

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #370

mapToSlice always News the slice element type and appends elem.Elem(). For []*Struct that yields **Struct, and mapToField then calls NumField on a pointer.

Allocate *Struct, map into it, and append the pointer when the element type is a pointer.

@unknwon
unknwon merged commit c3feeb9 into go-ini:v1 Nov 11, 2026
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.

panic: slice of struct pointers

2 participants