Commit 6fc53031 authored by whyrusleeping's avatar whyrusleeping

add DecodeReader method

parent c084f45a
......@@ -108,6 +108,10 @@ func DecodeInto(b []byte, v interface{}) error {
return unmarshaller.Unmarshal(b, v)
}
func DecodeReader(r io.Reader, v interface{}) error {
return unmarshaller.Decode(r, v)
}
// WrapObject converts an arbitrary object into a Node.
func WrapObject(m interface{}, mhType uint64, mhLen int) (*Node, error) {
data, err := marshaller.Marshal(m)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment