Removing unnecessary conditionals from common exts
diff --git a/openstack/common/extensions/results.go b/openstack/common/extensions/results.go
index 9319018..e98e5d6 100755
--- a/openstack/common/extensions/results.go
+++ b/openstack/common/extensions/results.go
@@ -1,8 +1,6 @@
package extensions
import (
- "fmt"
-
"github.com/mitchellh/mapstructure"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/pagination"
@@ -25,11 +23,8 @@
}
err := mapstructure.Decode(r.Resp, &res)
- if err != nil {
- return nil, fmt.Errorf("Error decoding OpenStack extension: %v", err)
- }
- return res.Extension, nil
+ return res.Extension, err
}
// Extension is a struct that represents an OpenStack extension.
@@ -65,9 +60,6 @@
}
err := mapstructure.Decode(page.(ExtensionPage).Body, &resp)
- if err != nil {
- return nil, err
- }
- return resp.Extensions, nil
+ return resp.Extensions, err
}