Skip to content

fix: tagged fixed-size array generation - #103

Merged
bxcodec merged 1 commit into
go-faker:mainfrom
yuefdev:fix/tagged-fixed-arrays-sol
Oct 27, 2026
Merged

bxcodec merged 1 commit into
go-faker:mainfrom
yuefdev:fix/tagged-fixed-arrays-sol

Conversation

@yuefdev

@yuefdev yuefdev commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Allocate an array value for tagged fixed-size arrays instead of calling reflect.MakeSlice on an array type. FakeData currently panics for fields such as [2]string tagged oneof: alpha, despite routing arrays through this handler.

Use the array's fixed length and retain the existing slice allocation/nil options. The regression panics before the fix and covers string/int/empty arrays plus a slice control. The full short suite, vet, changed-file gofmt and full golangci-lint pass. Race testing is unavailable locally without cgo.

@bxcodec bxcodec changed the title Fix tagged fixed-size array generation fix: tagged fixed-size array generation Oct 27, 2026
@bxcodec
bxcodec merged commit eb9c7e5 into go-faker:main Oct 27, 2026
2 checks passed
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.

3 participants