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
io/ioutil: nopCloser makes it impossible to assert to the enclosed type #12235
Comments
If the io.ReadCloser contains a noopCloser, that is. |
This is true. What's the larger problem? We're unlikely to export this. |
I came across this while writing some tests for code that made http But, it seems odd to have a type that adds a noop method and obscures the On Thu, Aug 20, 2015 at 4:07 PM, Brad Fitzpatrick notifications@github.com
|
I often hide stuff in anonymous structs or unexported things on purpose so I can use some implementation (like a I think this is working as intended, or at least nothing to do. |
Because ioutil.noopCloser is not exported, one cannot assert a io.ReadCloser to its original type.
The text was updated successfully, but these errors were encountered: