-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Introduction
I use Go for writing net applications so I often find myself using readers and writers to sockets to un/serialize data. While most of the packages inside encoding
do support that via Encoders/Decoders (base64, csv, json, xml..) I was pretty surprised to find that the encoding/hex
package doesn't. (Except for hex.Dumper
which isn't a viable alternative).
Proposal
My proposal is to add structs hex.Decoder
and hex.Encoder
(which respectively implement io.Reader
and io.Writer
) to make the encoding/hex
package more consistent with the rest of its siblings.
I don't think it would be hard to implement (it could be a nice way for me to contribute something back, but I'm fine if someone else wants to do it) and I understand that it's not anything vital or required (you can definitely achieve it right now with an external package like this one) but I still think it would be a nice thing to have.