1
0
mirror of https://github.com/ipfs/kubo.git synced 2025-06-26 15:42:21 +08:00

Merge pull request #4497 from ipfs/fix/ineff-assign

commands: remove dead code
This commit is contained in:
Whyrusleeping
2017-12-16 10:32:03 -08:00
committed by GitHub

View File

@ -114,15 +114,6 @@ func (c *Command) Call(req Request) Response {
isChan = actualType.Kind() == reflect.Chan
}
if isChan {
if ch, ok := output.(<-chan interface{}); ok {
output = ch
} else if ch, ok := output.(chan interface{}); ok {
output = (<-chan interface{})(ch)
}
}
// If the command specified an output type, ensure the actual value
// returned is of that type
if cmd.Type != nil && !isChan {