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-dms3
Commits
694ab679
Commit
694ab679
authored
Feb 06, 2018
by
Hector Sanjuan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Golint: unixfs/archive
License: MIT Signed-off-by:
Hector Sanjuan
<
hector@protocol.ai
>
parent
16a54a85
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
unixfs/archive/archive.go
unixfs/archive/archive.go
+1
-0
unixfs/archive/tar/writer.go
unixfs/archive/tar/writer.go
+4
-0
No files found.
unixfs/archive/archive.go
View file @
694ab679
// Package archive provides utilities to archive and compress a [Unixfs] DAG.
package
archive
import
(
...
...
unixfs/archive/tar/writer.go
View file @
694ab679
// Package tar provides functionality to write a unixfs merkledag
// as a tar archive.
package
tar
import
(
...
...
@@ -69,6 +71,7 @@ func (w *Writer) writeFile(nd *mdag.ProtoNode, pb *upb.Data, fpath string) error
return
nil
}
// WriteNode adds a node to the archive.
func
(
w
*
Writer
)
WriteNode
(
nd
ipld
.
Node
,
fpath
string
)
error
{
switch
nd
:=
nd
.
(
type
)
{
case
*
mdag
.
ProtoNode
:
...
...
@@ -106,6 +109,7 @@ func (w *Writer) WriteNode(nd ipld.Node, fpath string) error {
}
}
// Close closes the tar writer.
func
(
w
*
Writer
)
Close
()
error
{
return
w
.
TarW
.
Close
()
}
...
...
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