You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Couldn't this be simplified to *(*string)(unsafe.Pointer(&b))?
I appreciate that this is running in benchmarking code, but perhaps we should just opt for a good ol' fashioned string(b) here?
The impact is sure to be minor since this is just running in tests, but (a) I prefer to do things the right way and (b) I don't like it when my linter yells at me.
Thoughts?
The text was updated successfully, but these errors were encountered:
It seems likely that that would dominate the benchmark, so I'm hesitant to just do that. I wish the intentions of the benchmark were more explicitly spelled out; it would make it easier to try to find a safe way to write something that does the right thing.
In
integration_test.go
, the following is flagged bygo vet
as a possible misuse ofreflect.SliceHeader
andreflect.StringHeader
.A cursory google search supports the notion that this is a bug.
Two questions:
*(*string)(unsafe.Pointer(&b))
?string(b)
here?The impact is sure to be minor since this is just running in tests, but (a) I prefer to do things the right way and (b) I don't like it when my linter yells at me.
Thoughts?
The text was updated successfully, but these errors were encountered: