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:
parent
8415aeb39a
commit
2c187a24e0
11 changed files with 16 additions and 52 deletions
|
@ -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{}) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue