diff --git a/core/commands/refs.go b/core/commands/refs.go index 5a85bed1f954..5476f1f74524 100644 --- a/core/commands/refs.go +++ b/core/commands/refs.go @@ -1,7 +1,6 @@ package commands import ( - "bytes" "context" "errors" "fmt" @@ -15,8 +14,8 @@ import ( cid "gx/ipfs/QmR8BauakNcBa3RbE4nbQu76PDiJgoQgz8AJdhJuiU4TAw/go-cid" path "gx/ipfs/QmRG3XuGwT7GYuAqgWDJBKTzdaHMwAnc1x7J2KHEXNHxzG/go-path" + cmds "gx/ipfs/Qma6uuSyjkecGhMFFLfzyJDPyoDtNJSHJNweDccZhaWkgU/go-ipfs-cmds" ipld "gx/ipfs/QmcKKBwfz6FyQdHR2jsXrrF6XeSBXYL86anmWNewpFpoF5/go-ipld-format" - cmds "gx/ipfs/QmSXUokcP4TJpFfqozT69AVAYRtzXVMUjzQVkYX41R9Svs/go-ipfs-cmds" cmdkit "gx/ipfs/Qmde5VP1qUkyQXKCfmEUA7bP64V2HAptbJ7phuPp7jXWwg/go-ipfs-cmdkit" ) @@ -33,25 +32,6 @@ const ( refsMaxDepthOptionName = "max-depth" ) -// KeyListTextMarshaler outputs a KeyList as plaintext, one key per line -func KeyListTextMarshaler(res oldcmds.Response) (io.Reader, error) { - out, err := unwrapOutput(res.Output()) - if err != nil { - return nil, err - } - - output, ok := out.(*KeyList) - if !ok { - return nil, e.TypeErr(output, out) - } - - buf := new(bytes.Buffer) - for _, key := range output.Keys { - buf.WriteString(key.String() + "\n") - } - return buf, nil -} - var RefsCmd = &cmds.Command{ Helptext: cmdkit.HelpText{ Tagline: "List links (references) from an object.",