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-merkledag
Commits
2442feaa
Unverified
Commit
2442feaa
authored
Jul 25, 2019
by
Steven Allen
Committed by
GitHub
Jul 25, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #44 from ipfs/fix/errors
fix: return ErrLinkNotFound when the _link_ isn't found
parents
ea4cf399
f48088f7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
node.go
node.go
+1
-1
node_test.go
node_test.go
+1
-1
No files found.
node.go
View file @
2442feaa
...
...
@@ -138,7 +138,7 @@ func (n *ProtoNode) RemoveNodeLink(name string) error {
}
if
!
found
{
return
ipld
.
Err
NotFound
return
ErrLink
NotFound
}
n
.
links
=
ref
...
...
node_test.go
View file @
2442feaa
...
...
@@ -59,7 +59,7 @@ func TestRemoveLink(t *testing.T) {
// should fail
err
=
nd
.
RemoveNodeLink
(
"a"
)
if
err
!=
ipld
.
Err
NotFound
{
if
err
!=
ErrLink
NotFound
{
t
.
Fatal
(
"should have failed to remove link"
)
}
...
...
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