-
Notifications
You must be signed in to change notification settings - Fork 367
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Better cgo support #11
Comments
This is a reasonable request. I haven't spent much time dealing with cgo types under reflection, so I'm not sure how much is possible, but I'll take a look. |
After looking into this a bit tonight, I see that C.char is considered signed as an int8 under reflection. As a result, the hexdump style functionality is bypassed since it only works with uint8. There are a couple of ways to handle this. One way is to allow spew to hexdump int8 slices as well as uint8 slices, but I don't think that's really desirable for most cases. Another option that is a bit hackish is to look at the textual type (versus the reflected type) specifically to detect something like the pattern Any thoughts? |
I think looking for |
This commit adds support for dumping a few cgo types like hexdump -C as requested in issue #11. In particular, it now handles char [#], unsigned char [#], and uint8_t [#].
This feature, including new tests and an updated test coverage report has been implemented as of commit 1fe9f5c. |
This can be made smaller:
The text was updated successfully, but these errors were encountered: