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

Expose Write()/WriteByte()/WriteString() to Encoder (and similar for Decoder?) #127

Closed
lestrrat opened this issue Apr 30, 2017 · 2 comments

Comments

@lestrrat
Copy link

I'm trying to encode/decode an extension, namely https://github.com/fluent/fluentd/wiki/Forward-Protocol-Specification-v1#eventtime-ext-format

If my understanding is correct, to implement this you need to the ability to write raw bytes to the underlying io.Writer instead of using EncodeInt8, EncodeInt32, etc. But currently the capability to do this is in Encoder.w, which is no exposed to end users.

Should this be exposed? or is there a better way to do this?

@vmihailenco
Copy link
Owner

I've released v2.9.0 with some fixes and better example - https://godoc.org/gopkg.in/vmihailenco/msgpack.v2#example-RegisterExt

@lestrrat
Copy link
Author

lestrrat commented May 1, 2017

Thanks, read the docs, and made sense!

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

No branches or pull requests

2 participants