1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

return directly without ifs in remaining packages

Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>
This commit is contained in:
unclejack 2016-12-14 23:16:12 +02:00
parent 8415aeb39a
commit 2c187a24e0
11 changed files with 16 additions and 52 deletions

View file

@ -103,10 +103,8 @@ func newVolumePlugin(c *check.C, name string) *volumePlugin {
read := func(b io.ReadCloser) (pluginRequest, error) {
defer b.Close()
var pr pluginRequest
if err := json.NewDecoder(b).Decode(&pr); err != nil {
return pr, err
}
return pr, nil
err := json.NewDecoder(b).Decode(&pr)
return pr, err
}
send := func(w http.ResponseWriter, data interface{}) {