lunixbochs / struc

Better binary packing for Go
MIT License
572 stars 45 forks source link

Skip the remainder of parsing once a field is determined as unexported #19

Closed pdf closed 9 years ago

pdf commented 9 years ago

Otherwise fields that won't be packed anyway can cause the parser to bail with an error

pdf commented 9 years ago

So, the test is failing because somehow parseFields is getting passed the output buffer, rather than the nil data argument :confused:

lunixbochs commented 9 years ago

This is an error in the test. I'll fix it and cherry-pick your commit. Thanks!

lunixbochs commented 9 years ago

It does bother me a bit that I must not have good tests with private fields (and test coverage will drop as a result).

lunixbochs commented 9 years ago

Test fixed in 0194190f61cd5a1acdd9f22c6a1b9b842d99150e PR merged in 9c083688fecbcd6c8dea3b2edfddd49f4a7a45ff