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
b32dcdec
Commit
b32dcdec
authored
Oct 03, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing mutability issues in ipns
parent
60d738bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
merkledag.go
merkledag.go
+10
-0
No files found.
merkledag.go
View file @
b32dcdec
...
@@ -75,6 +75,16 @@ func (n *Node) RemoveNodeLink(name string) error {
...
@@ -75,6 +75,16 @@ func (n *Node) RemoveNodeLink(name string) error {
return
u
.
ErrNotFound
return
u
.
ErrNotFound
}
}
func
(
n
*
Node
)
Copy
()
*
Node
{
nnode
:=
new
(
Node
)
nnode
.
Data
=
make
([]
byte
,
len
(
n
.
Data
))
copy
(
nnode
.
Data
,
n
.
Data
)
nnode
.
Links
=
make
([]
*
Link
,
len
(
n
.
Links
))
copy
(
nnode
.
Links
,
n
.
Links
)
return
nnode
}
// Size returns the total size of the data addressed by node,
// Size returns the total size of the data addressed by node,
// including the total sizes of references.
// including the total sizes of references.
func
(
n
*
Node
)
Size
()
(
uint64
,
error
)
{
func
(
n
*
Node
)
Size
()
(
uint64
,
error
)
{
...
...
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