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
40be065a
Commit
40be065a
authored
Oct 03, 2014
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a little more progress... and some debugging code
parent
b32dcdec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
merkledag.go
merkledag.go
+8
-0
No files found.
merkledag.go
View file @
40be065a
...
@@ -46,6 +46,14 @@ type Link struct {
...
@@ -46,6 +46,14 @@ type Link struct {
// AddNodeLink adds a link to another node.
// AddNodeLink adds a link to another node.
func
(
n
*
Node
)
AddNodeLink
(
name
string
,
that
*
Node
)
error
{
func
(
n
*
Node
)
AddNodeLink
(
name
string
,
that
*
Node
)
error
{
// DEBUG CODE
for
_
,
l
:=
range
n
.
Links
{
if
l
.
Name
==
name
{
panic
(
"Trying to add child that already exists!"
)
}
}
//
s
,
err
:=
that
.
Size
()
s
,
err
:=
that
.
Size
()
if
err
!=
nil
{
if
err
!=
nil
{
return
err
return
err
...
...
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