cmds: remove reduntant func
License: MIT Signed-off-by: Overbool <overbool.xu@gmail.com>
Overbool committed
Nov 8, 2018 at 15:21 UTC
57b0c0f7923803acb10d39d5361c57e2d1703e0b
1 file changed
-18
core/commands/root.go
-18
@@ -2,13 +2,9 @@ package commands
2
3
import (
4
"errors"
5
- "io"
6
- "strings"
5
8
- oldcmds "github.com/ipfs/go-ipfs/commands"
6
lgc "github.com/ipfs/go-ipfs/commands/legacy"
7
dag "github.com/ipfs/go-ipfs/core/commands/dag"
11
- e "github.com/ipfs/go-ipfs/core/commands/e"
8
name "github.com/ipfs/go-ipfs/core/commands/name"
9
ocmd "github.com/ipfs/go-ipfs/core/commands/object"
10
unixfs "github.com/ipfs/go-ipfs/core/commands/unixfs"
@@ -214,17 +210,3 @@ func init() {
210
type MessageOutput struct {
211
Message string
212
}
217
-
218
-func MessageTextMarshaler(res oldcmds.Response) (io.Reader, error) {
219
- v, err := unwrapOutput(res.Output())
220
- if err != nil {
221
- return nil, err
222
- }
223
-
224
- out, ok := v.(*MessageOutput)
225
- if !ok {
226
- return nil, e.TypeErr(out, v)
227
- }
228
-
229
- return strings.NewReader(out.Message), nil
230
-}