@cryptotaxi247 / kubo / commits / 0419ce1d2

commands: Removed unused cleanup function

Matt Bell committed Jan 6, 2015 at 12:06 UTC 0419ce1d200e3b9a2b4220ca1510d2395b2a5333
2 files changed -14
commands/command.go
-8
@@ -135,14 +135,6 @@ func (c *Command) Call(req Request) Response {
135 }
136 }
137
138 - // clean up the request (close the readers, e.g. fileargs)
139 - // NOTE: this means commands can't expect to keep reading after cmd.Run returns (in a goroutine)
140 - err = req.Cleanup()
141 - if err != nil {
142 - res.SetError(err, ErrNormal)
143 - return res
144 - }
145 -
138 res.SetOutput(output)
139 return res
140 }
commands/request.go
-6
@@ -70,7 +70,6 @@ type Request interface {
70 Context() *Context
71 SetContext(Context)
72 Command() *Command
73 - Cleanup() error
73
74 ConvertOptions() error
75 }
@@ -174,11 +173,6 @@ func (r *request) Command() *Command {
173 return r.cmd
174 }
175
177 -func (r *request) Cleanup() error {
178 - // TODO
179 - return nil
180 -}
181 -
176 type converter func(string) (interface{}, error)
177
178 var converters = map[reflect.Kind]converter{