mirror of
https://github.com/ipfs/kubo.git
synced 2026-02-28 22:08:01 +08:00
core/commands: Added plaintext marshaler for 'pin ls'
This commit is contained in:
parent
db53de806c
commit
49dc13e5dd
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user