mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 18:13:54 +08:00
Fix key rename command output error
License: MIT Signed-off-by: Xiaoyi Wang <wangxiaoyi@hyperchain.cn>
This commit is contained in:
@ -306,7 +306,11 @@ var keyRenameCmd = &cmds.Command{
|
|||||||
},
|
},
|
||||||
Marshalers: cmds.MarshalerMap{
|
Marshalers: cmds.MarshalerMap{
|
||||||
cmds.Text: func(res cmds.Response) (io.Reader, error) {
|
cmds.Text: func(res cmds.Response) (io.Reader, error) {
|
||||||
k, ok := res.Output().(*KeyRenameOutput)
|
v, err := unwrapOutput(res.Output())
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
|
k, ok := v.(*KeyRenameOutput)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, fmt.Errorf("expected a KeyRenameOutput as command result")
|
return nil, fmt.Errorf("expected a KeyRenameOutput as command result")
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user