Merge pull request #6272 from ipfs/fix/add/fileerr

add: Return error from iterator
This commit is contained in:
Steven Allen 2019-04-27 12:55:17 -07:00 committed by GitHub
commit 5e28d489ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -267,6 +267,10 @@ You can now check what blocks have been created by:
added++
}
if addit.Err() != nil {
return addit.Err()
}
if added == 0 {
return fmt.Errorf("expected a file argument")
}