提交 0419ce1d 作者: Matt Bell

commands: Removed unused cleanup function

上级 c2f46b61
......@@ -135,14 +135,6 @@ func (c *Command) Call(req Request) Response {
}
}
// clean up the request (close the readers, e.g. fileargs)
// NOTE: this means commands can't expect to keep reading after cmd.Run returns (in a goroutine)
err = req.Cleanup()
if err != nil {
res.SetError(err, ErrNormal)
return res
}
res.SetOutput(output)
return res
}
......
......@@ -70,7 +70,6 @@ type Request interface {
Context() *Context
SetContext(Context)
Command() *Command
Cleanup() error
ConvertOptions() error
}
......@@ -174,11 +173,6 @@ func (r *request) Command() *Command {
return r.cmd
}
func (r *request) Cleanup() error {
// TODO
return nil
}
type converter func(string) (interface{}, error)
var converters = map[reflect.Kind]converter{
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论