File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -108,6 +108,7 @@ func DecodeInto(b []byte, v interface{}) error {
108108 return unmarshaller .Unmarshal (b , v )
109109}
110110
111+ // DecodeReader reads from the given reader and decodes a serialized IPLD cbor object into the given object.
111112func DecodeReader (r io.Reader , v interface {}) error {
112113 return unmarshaller .Decode (r , v )
113114}
@@ -400,6 +401,11 @@ func DumpObject(obj interface{}) (out []byte, err error) {
400401 return marshaller .Marshal (obj )
401402}
402403
404+ // EncodeWriter marshals into the writer any object as its CBOR serialized byte representation.
405+ func EncodeWriter (obj interface {}, w io.Writer ) error {
406+ return marshaller .Encode (obj , w )
407+ }
408+
403409func toSaneMap (n map [interface {}]interface {}) (interface {}, error ) {
404410 if lnk , ok := n ["/" ]; ok && len (n ) == 1 {
405411 lnkb , ok := lnk .([]byte )
You can’t perform that action at this time.
0 commit comments