Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-ld-cbor
Commits
6fc53031
Commit
6fc53031
authored
Jul 09, 2019
by
whyrusleeping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add DecodeReader method
parent
c084f45a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
node.go
node.go
+4
-0
No files found.
node.go
View file @
6fc53031
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment