Fixing small issues based on code review
diff --git a/openstack/networking/v2/extensions/layer3/routers/requests.go b/openstack/networking/v2/extensions/layer3/routers/requests.go
index edbb366..dbfd36b 100755
--- a/openstack/networking/v2/extensions/layer3/routers/requests.go
+++ b/openstack/networking/v2/extensions/layer3/routers/requests.go
@@ -1,7 +1,7 @@
package routers
import (
- "fmt"
+ "errors"
"github.com/racker/perigee"
"github.com/rackspace/gophercloud"
@@ -156,7 +156,7 @@
return res
}
-var errInvalidInterfaceOpts = fmt.Errorf("When adding a router interface you must provide either a subnet ID or a port ID")
+var errInvalidInterfaceOpts = errors.New("When adding a router interface you must provide either a subnet ID or a port ID")
// InterfaceOpts allow you to work with operations that either add or remote
// an internal interface from a router.
@@ -192,6 +192,7 @@
// Validate
if (opts.SubnetID == "" && opts.PortID == "") || (opts.SubnetID != "" && opts.PortID != "") {
res.Err = errInvalidInterfaceOpts
+ return res
}
type request struct {