output + linting
Juan Batiz-Benet committed
Sep 20, 2014 at 07:33 UTC
64ba4cd0df3334bb4ee211603887b14e44d064c3
4 files changed
+5
-3
core/commands/add.go
+1
-1
@@ -26,7 +26,7 @@ func Add(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Wr
26
nd, err := AddPath(n, path, depth)
27
if err != nil {
28
if err == ErrDepthLimitExceeded && depth == 1 {
29
- err = errors.New("use -r to recursively add directories.")
29
+ err = errors.New("use -r to recursively add directories")
30
}
31
return fmt.Errorf("addFile error: %v", err)
32
}
core/core.go
+2
-1
@@ -207,7 +207,8 @@ func initConnections(cfg *config.Config, route *dht.IpfsDHT) {
207
}
208
}
209
210
+// PinDagNode ensures a given node is stored persistently locally.
211
func (n *IpfsNode) PinDagNode(nd *merkledag.Node) error {
211
- u.POut("Pinning node. Currently No-Op\n")
212
+ u.DOut("Pinning node. Currently No-Op\n")
213
return nil
214
}
merkledag/merkledag.go
-1
@@ -130,7 +130,6 @@ func (n *DAGService) AddRecursive(nd *Node) error {
130
}
131
132
for _, link := range nd.Links {
133
- fmt.Println("Adding link.")
133
if link.Node == nil {
134
panic("Why does this node have a nil link?\n")
135
}
util/util.go
+2
@@ -31,6 +31,7 @@ var ErrNotFound = errors.New("Error: Not Found.")
31
// Key is a string representation of multihash for use with maps.
32
type Key string
33
34
+// Pretty returns Key in a b58 encoded string
35
func (k Key) Pretty() string {
36
return b58.Encode([]byte(k))
37
}
@@ -80,6 +81,7 @@ func DOut(format string, a ...interface{}) {
81
}
82
}
83
84
+// ExpandPathnames takes a set of paths and turns them into absolute paths
85
func ExpandPathnames(paths []string) ([]string, error) {
86
var out []string
87
for _, p := range paths {