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-unixfs
Commits
9dacd09a
Commit
9dacd09a
authored
Jan 28, 2019
by
Łukasz Magiera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
io: return nil when EOF is reached in WriteTo
parent
ac466e66
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
7 deletions
+2
-7
io/dagreader.go
io/dagreader.go
+2
-7
No files found.
io/dagreader.go
View file @
9dacd09a
...
...
@@ -320,15 +320,10 @@ func (dr *dagReader) WriteTo(w io.Writer) (n int64, err error) {
})
if
err
==
ipld
.
EndOfDag
{
return
n
,
io
.
EOF
// Reached the end of the (DAG) file, no more data to read.
// TODO: Is this a correct return error for `WriteTo`?
}
else
if
err
!=
nil
{
return
n
,
err
// Pass along any other errors from the `Visitor`.
return
n
,
nil
}
return
n
,
nil
return
n
,
err
}
// Close the reader (cancelling fetch node operations requested with
...
...
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