@cryptotaxi247 / kubo / commits / 694ab6795

Golint: unixfs/archive

License: MIT Signed-off-by: Hector Sanjuan <hector@protocol.ai>

Hector Sanjuan committed Feb 6, 2018 at 12:43 UTC 694ab67952d7668df59a5f6109b80aade10bf023
2 files changed +5
unixfs/archive/archive.go
+1
@@ -1,3 +1,4 @@
1 +// Package archive provides utilities to archive and compress a [Unixfs] DAG.
2 package archive
3
4 import (
unixfs/archive/tar/writer.go
+4
@@ -1,3 +1,5 @@
1 +// Package tar provides functionality to write a unixfs merkledag
2 +// as a tar archive.
3 package tar
4
5 import (
@@ -69,6 +71,7 @@ func (w *Writer) writeFile(nd *mdag.ProtoNode, pb *upb.Data, fpath string) error
71 return nil
72 }
73
74 +// WriteNode adds a node to the archive.
75 func (w *Writer) WriteNode(nd ipld.Node, fpath string) error {
76 switch nd := nd.(type) {
77 case *mdag.ProtoNode:
@@ -106,6 +109,7 @@ func (w *Writer) WriteNode(nd ipld.Node, fpath string) error {
109 }
110 }
111
112 +// Close closes the tar writer.
113 func (w *Writer) Close() error {
114 return w.TarW.Close()
115 }