-
-
Notifications
You must be signed in to change notification settings - Fork 148
bugfix(faker): don't panic on typed array #99
Conversation
Codecov Report
@@ Coverage Diff @@
## master #99 +/- ##
==========================================
- Coverage 94.90% 94.75% -0.16%
==========================================
Files 10 10
Lines 1001 1010 +9
==========================================
+ Hits 950 957 +7
- Misses 28 29 +1
- Partials 23 24 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't push to your branch, so can you help to resolve the conflict, please?
Will released v3.4.0 after this PR fixed |
Fixed error: ``` $ cat > /tmp/1.go <<EOF package main import "github.com/bxcodec/faker" type array [16]byte func main() { var a array faker.FakeData(&a) } EOF $ go run /tmp/1.go panic: reflect.MakeSlice of non-slice type goroutine 1 [running]: reflect.MakeSlice(0x53d860, 0x4eed00, 0xd, 0xd, 0x0, 0x0, 0x0) /home/xaionaro/.gimme/versions/go1.13.linux.amd64/src/reflect/value.go:2256 +0x1d8 github.com/bxcodec/faker.getValue(0x4eed00, 0xc0000163a0, 0x191, 0x4eed01, 0x4eed00, 0xc0000163a0, 0x20300000000000) /home/xaionaro/go/src/github.com/bxcodec/faker/faker.go:444 +0xca0 github.com/bxcodec/faker.getValue(0x4dea40, 0xc000016380, 0xc00000e240, 0xc00000e220, 0x40c556, 0xc00000e1e0, 0xc00000e1c0) /home/xaionaro/go/src/github.com/bxcodec/faker/faker.go:355 +0x169e github.com/bxcodec/faker.FakeData(0x4dea40, 0xc000016380, 0x56e00, 0xc0000240b8) /home/xaionaro/go/src/github.com/bxcodec/faker/faker.go:280 +0x1c6 main.main() /tmp/1.go:6 +0x3d exit status 2 ``` Signed-off-by: Dmitry Yu Okunev <xaionaro@dx.center>
@bxcodec reapplied the patch over the recent master (it should solve the conflict).
Thank you :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
go fmt
+ fixed error: