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
4bed3877
Commit
4bed3877
authored
Feb 03, 2018
by
Whyrusleeping
Committed by
GitHub
Feb 03, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4640 from ipfs/doc/godoc-importer
Docs: golint-ify "importers" module
parents
53bab4f9
6f545b7e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
2 deletions
+4
-2
format.go
format.go
+2
-0
mod/dagmodifier.go
mod/dagmodifier.go
+1
-1
test/utils.go
test/utils.go
+1
-1
No files found.
format.go
View file @
4bed3877
...
...
@@ -174,6 +174,8 @@ func (n *FSNode) GetBytes() ([]byte, error) {
return
proto
.
Marshal
(
pbn
)
}
// FileSize returns the total size of this tree. That is, the size of
// the data in this node plus the size of all its children.
func
(
n
*
FSNode
)
FileSize
()
uint64
{
return
uint64
(
len
(
n
.
Data
))
+
n
.
subtotal
}
...
...
mod/dagmodifier.go
View file @
4bed3877
...
...
@@ -362,7 +362,7 @@ func (dm *DagModifier) appendData(nd ipld.Node, spl chunk.Splitter) (ipld.Node,
Prefix
:
&
dm
.
Prefix
,
RawLeaves
:
dm
.
RawLeaves
,
}
return
trickle
.
Trickle
Append
(
dm
.
ctx
,
nd
,
dbp
.
New
(
spl
))
return
trickle
.
Append
(
dm
.
ctx
,
nd
,
dbp
.
New
(
spl
))
default
:
return
nil
,
ErrNotUnixfs
}
...
...
test/utils.go
View file @
4bed3877
...
...
@@ -63,7 +63,7 @@ func GetNode(t testing.TB, dserv ipld.DAGService, data []byte, opts NodeOpts) ip
RawLeaves
:
opts
.
RawLeavesUsed
,
}
node
,
err
:=
trickle
.
Trickle
Layout
(
dbp
.
New
(
SizeSplitterGen
(
500
)(
in
)))
node
,
err
:=
trickle
.
Layout
(
dbp
.
New
(
SizeSplitterGen
(
500
)(
in
)))
if
err
!=
nil
{
t
.
Fatal
(
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