core/commands: Added plaintext marshaler for 'pin ls'

This commit is contained in:
Matt Bell 2014-11-18 23:20:38 -08:00
parent db53de806c
commit 49dc13e5dd

View File

@ -6,7 +6,6 @@ import (
cmds "github.com/jbenet/go-ipfs/commands"
"github.com/jbenet/go-ipfs/core"
"github.com/jbenet/go-ipfs/merkledag"
u "github.com/jbenet/go-ipfs/util"
)
var pinCmd = &cmds.Command{
@ -116,9 +115,14 @@ or recursively pinned are not included in the list.
return nil, err
}
return n.Pinning.Set().GetKeys(), nil
return &KeyList{
Keys: n.Pinning.Set().GetKeys(),
}, nil
},
Type: &KeyList{},
Marshalers: cmds.MarshalerMap{
cmds.Text: KeyListTextMarshaler,
},
Type: []u.Key{},
}
func pin(n *core.IpfsNode, paths []string, recursive bool) ([]*merkledag.Node, error) {