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-unixfs
Commits
7cf2f1e0
Commit
7cf2f1e0
authored
Nov 15, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update to newer ipld node interface with Copy and better Tree
License: MIT Signed-off-by:
Jeromy
<
why@ipfs.io
>
parent
f6018292
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
io/dagreader.go
io/dagreader.go
+1
-1
io/dirbuilder.go
io/dirbuilder.go
+1
-1
io/resolve.go
io/resolve.go
+1
-1
mod/dagmodifier.go
mod/dagmodifier.go
+4
-4
test/utils.go
test/utils.go
+1
-1
No files found.
io/dagreader.go
View file @
7cf2f1e0
...
...
@@ -12,7 +12,7 @@ import (
ft
"github.com/ipfs/go-ipfs/unixfs"
ftpb
"github.com/ipfs/go-ipfs/unixfs/pb"
node
"gx/ipfs/QmU
7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g
/go-ipld-node"
node
"gx/ipfs/QmU
sVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
)
...
...
io/dirbuilder.go
View file @
7cf2f1e0
...
...
@@ -5,7 +5,7 @@ import (
mdag
"github.com/ipfs/go-ipfs/merkledag"
format
"github.com/ipfs/go-ipfs/unixfs"
cid
"gx/ipfs/Qm
Xfiyr2RWEXpVDdaYnD2HNiBk6UBddsvEP4RPfXb6nGqY
/go-cid"
cid
"gx/ipfs/Qm
cEcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU
/go-cid"
)
type
directoryBuilder
struct
{
...
...
io/resolve.go
View file @
7cf2f1e0
...
...
@@ -6,7 +6,7 @@ import (
dag
"github.com/ipfs/go-ipfs/merkledag"
ft
"github.com/ipfs/go-ipfs/unixfs"
node
"gx/ipfs/QmU
7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g
/go-ipld-node"
node
"gx/ipfs/QmU
sVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
)
func
ResolveUnixfsOnce
(
ctx
context
.
Context
,
ds
dag
.
DAGService
,
nd
node
.
Node
,
name
string
)
(
*
node
.
Link
,
error
)
{
...
...
mod/dagmodifier.go
View file @
7cf2f1e0
...
...
@@ -15,9 +15,9 @@ import (
uio
"github.com/ipfs/go-ipfs/unixfs/io"
logging
"gx/ipfs/QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52/go-log"
node
"gx/ipfs/QmU7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g/go-ipld-node"
cid
"gx/ipfs/QmXfiyr2RWEXpVDdaYnD2HNiBk6UBddsvEP4RPfXb6nGqY/go-cid"
node
"gx/ipfs/QmUsVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq/go-ipld-node"
proto
"gx/ipfs/QmZ4Qi3GaRbjcx28Sme5eMH7RQjGkt8wHxt2a65oLaeFEV/gogo-protobuf/proto"
cid
"gx/ipfs/QmcEcrBAMrwMyhSjXt4yfyPpzgSuV8HLHavnfmiKCSRqZU/go-cid"
)
var
ErrSeekFail
=
errors
.
New
(
"failed to seek properly"
)
...
...
@@ -53,7 +53,7 @@ func NewDagModifier(ctx context.Context, from node.Node, serv mdag.DAGService, s
}
return
&
DagModifier
{
curNode
:
pbn
.
Copy
(),
curNode
:
pbn
.
Copy
()
.
(
*
mdag
.
ProtoNode
)
,
dagserv
:
serv
,
splitter
:
spl
,
ctx
:
ctx
,
...
...
@@ -373,7 +373,7 @@ func (dm *DagModifier) GetNode() (*mdag.ProtoNode, error) {
if
err
!=
nil
{
return
nil
,
err
}
return
dm
.
curNode
.
Copy
(),
nil
return
dm
.
curNode
.
Copy
()
.
(
*
mdag
.
ProtoNode
)
,
nil
}
// HasChanges returned whether or not there are unflushed changes to this dag
...
...
test/utils.go
View file @
7cf2f1e0
...
...
@@ -14,7 +14,7 @@ import (
mdagmock
"github.com/ipfs/go-ipfs/merkledag/test"
ft
"github.com/ipfs/go-ipfs/unixfs"
node
"gx/ipfs/QmU
7bFWQ793qmvNy7outdCaMfSDNk8uqhx4VNrxYj5fj5g
/go-ipld-node"
node
"gx/ipfs/QmU
sVJ7AEnGyjX8YWnrwq9vmECVGwBQNAKPpgz5KSg8dcq
/go-ipld-node"
u
"gx/ipfs/Qmb912gdngC1UWwTkhuW8knyRbcWeu5kqkxBpveLmW8bSr/go-ipfs-util"
)
...
...
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