diff --git a/core/commands/add.go b/core/commands/add.go index 59c1385b5..3f9d66334 100644 --- a/core/commands/add.go +++ b/core/commands/add.go @@ -26,7 +26,7 @@ func Add(n *core.IpfsNode, args []string, opts map[string]interface{}, out io.Wr nd, err := AddPath(n, path, depth) if err != nil { if err == ErrDepthLimitExceeded && depth == 1 { - err = errors.New("use -r to recursively add directories.") + err = errors.New("use -r to recursively add directories") } return fmt.Errorf("addFile error: %v", err) } diff --git a/core/core.go b/core/core.go index 5f91324f2..5d3751a6b 100644 --- a/core/core.go +++ b/core/core.go @@ -207,7 +207,8 @@ func initConnections(cfg *config.Config, route *dht.IpfsDHT) { } } +// PinDagNode ensures a given node is stored persistently locally. func (n *IpfsNode) PinDagNode(nd *merkledag.Node) error { - u.POut("Pinning node. Currently No-Op\n") + u.DOut("Pinning node. Currently No-Op\n") return nil } diff --git a/merkledag/merkledag.go b/merkledag/merkledag.go index 79530df6d..1ec5f3c5e 100644 --- a/merkledag/merkledag.go +++ b/merkledag/merkledag.go @@ -130,7 +130,6 @@ func (n *DAGService) AddRecursive(nd *Node) error { } for _, link := range nd.Links { - fmt.Println("Adding link.") if link.Node == nil { panic("Why does this node have a nil link?\n") } diff --git a/util/util.go b/util/util.go index 9c17fe0e6..548d777ba 100644 --- a/util/util.go +++ b/util/util.go @@ -31,6 +31,7 @@ var ErrNotFound = errors.New("Error: Not Found.") // Key is a string representation of multihash for use with maps. type Key string +// Pretty returns Key in a b58 encoded string func (k Key) Pretty() string { return b58.Encode([]byte(k)) } @@ -80,6 +81,7 @@ func DOut(format string, a ...interface{}) { } } +// ExpandPathnames takes a set of paths and turns them into absolute paths func ExpandPathnames(paths []string) ([]string, error) { var out []string for _, p := range paths {