core/commands: Added plaintext marshaler for 'pin ls'
Matt Bell committed
Nov 18, 2014 at 23:20 UTC
49dc13e5ddb4b60e170f2171664346e48c43153b
1 file changed
+7
-3
core/commands/pin.go
+7
-3
@@ -6,7 +6,6 @@ import (
6
cmds "github.com/jbenet/go-ipfs/commands"
7
"github.com/jbenet/go-ipfs/core"
8
"github.com/jbenet/go-ipfs/merkledag"
9
- u "github.com/jbenet/go-ipfs/util"
9
)
10
11
var pinCmd = &cmds.Command{
@@ -116,9 +115,14 @@ or recursively pinned are not included in the list.
115
return nil, err
116
}
117
119
- return n.Pinning.Set().GetKeys(), nil
118
+ return &KeyList{
119
+ Keys: n.Pinning.Set().GetKeys(),
120
+ }, nil
121
+ },
122
+ Type: &KeyList{},
123
+ Marshalers: cmds.MarshalerMap{
124
+ cmds.Text: KeyListTextMarshaler,
125
},
121
- Type: []u.Key{},
126
}
127
128
func pin(n *core.IpfsNode, paths []string, recursive bool) ([]*merkledag.Node, error) {