Abstract batch ID query generation
diff --git a/rackspace/lb/v1/nodes/requests.go b/rackspace/lb/v1/nodes/requests.go
index a1524dc..e794197 100644
--- a/rackspace/lb/v1/nodes/requests.go
+++ b/rackspace/lb/v1/nodes/requests.go
@@ -3,11 +3,11 @@
import (
"errors"
"fmt"
- "strconv"
"github.com/racker/perigee"
"github.com/rackspace/gophercloud"
"github.com/rackspace/gophercloud/pagination"
+ "github.com/rackspace/gophercloud/rackspace/lb/v1"
)
func List(client *gophercloud.ServiceClient, loadBalancerID int, limit *int) pagination.Pager {
@@ -101,14 +101,7 @@
}
url := rootURL(c, loadBalancerID)
- for k, v := range nodeIDs {
- if k == 0 {
- url += "?"
- } else {
- url += "&"
- }
- url += "id=" + strconv.Itoa(v)
- }
+ url += v1.IDSliceToQueryString("id", nodeIDs)
_, res.Err = perigee.Request("DELETE", url, perigee.Options{
MoreHeaders: c.AuthenticatedHeaders(),