From 49dc13e5ddb4b60e170f2171664346e48c43153b Mon Sep 17 00:00:00 2001 From: Matt Bell Date: Tue, 18 Nov 2014 23:20:38 -0800 Subject: [PATCH] core/commands: Added plaintext marshaler for 'pin ls' --- core/commands/pin.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/core/commands/pin.go b/core/commands/pin.go index d39a7ce66..a226a887e 100644 --- a/core/commands/pin.go +++ b/core/commands/pin.go @@ -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) {