Add EncodeBytes and DecodeBytes functions
cenkalti opened this issue · 2 comments
cenkalti commented
There are helper functions for encoding and decoding strings but not for bytes:
func DecodeString(in string, val interface{}) error
func EncodeString(val interface{}) (string, error)
If you don't have any objection, I would like to implement
func DecodeBytes(b []byte, val interface{}) error
func EncodeBytes(val interface{}) ([]byte, error)
functions and send you a pull request, OK?
zeebo commented
Sounds good to me as long as you also add yourself to the AUTHORS file and agree to license the code under the LICENSE.