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
f2fc6cec
Commit
f2fc6cec
authored
Aug 17, 2017
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
helpers: take NodeGetter instead of DAGService.
parent
33803890
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
daghelpers.go
daghelpers.go
+2
-2
No files found.
daghelpers.go
View file @
f2fc6cec
...
...
@@ -9,7 +9,7 @@ import (
// GetDAG will fill out all of the links of the given Node.
// It returns an array of NodePromise with the linked nodes all in the proper
// order.
func
GetDAG
(
ctx
context
.
Context
,
ds
DAGService
,
root
Node
)
[]
*
NodePromise
{
func
GetDAG
(
ctx
context
.
Context
,
ds
NodeGetter
,
root
Node
)
[]
*
NodePromise
{
var
cids
[]
*
cid
.
Cid
for
_
,
lnk
:=
range
root
.
Links
()
{
cids
=
append
(
cids
,
lnk
.
Cid
)
...
...
@@ -20,7 +20,7 @@ func GetDAG(ctx context.Context, ds DAGService, root Node) []*NodePromise {
// GetNodes returns an array of 'FutureNode' promises, with each corresponding
// to the key with the same index as the passed in keys
func
GetNodes
(
ctx
context
.
Context
,
ds
DAGService
,
keys
[]
*
cid
.
Cid
)
[]
*
NodePromise
{
func
GetNodes
(
ctx
context
.
Context
,
ds
NodeGetter
,
keys
[]
*
cid
.
Cid
)
[]
*
NodePromise
{
// Early out if no work to do
if
len
(
keys
)
==
0
{
...
...
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