Skip to content
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

Implement io.Reader interface on msg #11

Closed
wneessen opened this issue May 28, 2022 · 0 comments · Fixed by #12
Closed

Implement io.Reader interface on msg #11

wneessen opened this issue May 28, 2022 · 0 comments · Fixed by #12

Comments

@wneessen
Copy link
Owner

I thought about using io.Copy for convenience reasons, such as dumping a message to log writer, but tbh this is not something I really need. I'm perfectly fine with current API =) However, as Msg now satisfies io.WriterTo it seems strange that you can't use it as an argument for widely used io.Copy. I think adding this makes sense.

Originally posted by @inliquid in #3 (reply in thread)

wneessen added a commit that referenced this issue May 28, 2022
This PR adds a `Msg.Read()` method which satisfies the `io.Reader` interface
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant