No need for a buffer to decode CORK objects
This commit is contained in:
parent
862df0c9e3
commit
6f9cac13f3
1 changed files with 1 additions and 1 deletions
|
@ -36,7 +36,7 @@ func Encode(src interface{}) (dst []byte) {
|
|||
|
||||
// Decode decodes a CORK into a data object.
|
||||
func Decode(src []byte, dst interface{}) {
|
||||
buf := bytes.NewBuffer(src)
|
||||
buf := bytes.NewReader(src)
|
||||
cork.NewDecoder(buf).Options(&opt).Decode(dst)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue