Closed dolmen closed 5 months ago
Types NewEncoderFunc
and NewDecoderFunc
could be moved as well to the util package (and replaced by the anonymous func types in the Codec
type).
Good point.
Thanks for all those detail. They will really improve the public API which is something I care about, but I was to entrenched in my hacking mindset of the time.
About the
encoding
API, theWrapCodec
,WrapDecoder
andWrapEncoder
are utility funcs which are only useful to implementers ofCodec
s: they are implementation details that are not useful to users of theencoding
package.So I propose to move them to their own package
github.com/dolanor/rip/encoding/codecutil
. That will make the API ofencoding
package lighter and easier to learn.