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-format
Commits
3d8b6894
Commit
3d8b6894
authored
Mar 23, 2020
by
Hector Sanjuan
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add IsErrNotFound() method
parent
6e38c33b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
merkledag.go
merkledag.go
+7
-0
No files found.
merkledag.go
View file @
3d8b6894
...
...
@@ -2,6 +2,7 @@ package format
import
(
"context"
"errors"
"fmt"
cid
"github.com/ipfs/go-cid"
...
...
@@ -41,6 +42,12 @@ func (e ErrNotFound) NotFound() bool {
return
true
}
// IsNotFound returns if the given error is or wraps an ErrNotFound
// (equivalent to errors.Is(err, ErrNotFound{}))
func
IsNotFound
(
err
error
)
bool
{
return
errors
.
Is
(
err
,
ErrNotFound
{})
}
// Either a node or an error.
type
NodeOption
struct
{
Node
Node
...
...
tavit ohanian
@tavit
mentioned in commit
6a5fbeae
·
Apr 19, 2021
mentioned in commit
6a5fbeae
mentioned in commit 6a5fbeae4745f8c5f305d320a4e626756ff16279
Toggle commit list
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