tmp commit, auth unit tests broken
diff --git a/pagination/http.go b/pagination/http.go
index 9ac2372..db31b55 100644
--- a/pagination/http.go
+++ b/pagination/http.go
@@ -53,7 +53,7 @@
// Request performs an HTTP request and extracts the http.Response from the result.
func Request(client *gophercloud.ServiceClient, headers map[string]string, url string) (*http.Response, error) {
- return client.Request("GET", url, &gophercloud.RequestOpts{
+ return client.Request("GET", url, gophercloud.RequestOpts{
MoreHeaders: headers,
OkCodes: []int{200, 204},
})
diff --git a/pagination/null.go b/pagination/null.go
deleted file mode 100644
index ae57e18..0000000
--- a/pagination/null.go
+++ /dev/null
@@ -1,20 +0,0 @@
-package pagination
-
-// nullPage is an always-empty page that trivially satisfies all Page interfacts.
-// It's useful to be returned along with an error.
-type nullPage struct{}
-
-// NextPageURL always returns "" to indicate that there are no more pages to return.
-func (p nullPage) NextPageURL() (string, error) {
- return "", nil
-}
-
-// IsEmpty always returns true to prevent iteration over nullPages.
-func (p nullPage) IsEmpty() (bool, error) {
- return true, nil
-}
-
-// LastMark always returns "" because the nullPage contains no items to have a mark.
-func (p nullPage) LastMark() (string, error) {
- return "", nil
-}
diff --git a/pagination/pager.go b/pagination/pager.go
index 415442f..9fa1f93 100644
--- a/pagination/pager.go
+++ b/pagination/pager.go
@@ -145,7 +145,7 @@
// key is the map key for the page body if the body type is `map[string]interface{}`.
var key string
// Iterate over the pages to concatenate the bodies.
- err := p.EachPage(func(page Page) (bool, error) {
+ err = p.EachPage(func(page Page) (bool, error) {
b := page.GetBody().(map[string]interface{})
for k := range b {
// If it's a linked page, we don't want the `links`, we want the other one.
@@ -164,7 +164,7 @@
body.SetMapIndex(reflect.ValueOf(key), reflect.ValueOf(pagesSlice))
case []byte:
// Iterate over the pages to concatenate the bodies.
- err := p.EachPage(func(page Page) (bool, error) {
+ err = p.EachPage(func(page Page) (bool, error) {
b := page.GetBody().([]byte)
pagesSlice = append(pagesSlice, b)
// seperate pages with a comma
@@ -188,7 +188,7 @@
body.SetBytes(b)
case []interface{}:
// Iterate over the pages to concatenate the bodies.
- err := p.EachPage(func(page Page) (bool, error) {
+ err = p.EachPage(func(page Page) (bool, error) {
b := page.GetBody().([]interface{})
pagesSlice = append(pagesSlice, b...)
return true, nil
@@ -202,7 +202,7 @@
body.Index(i).Set(reflect.ValueOf(s))
}
default:
- err := gophercloud.ErrUnexpectedType{}
+ err = gophercloud.ErrUnexpectedType{}
err.Expected = "map[string]interface{}/[]byte/[]interface{}"
err.Actual = fmt.Sprintf("%v", reflect.TypeOf(testPage.GetBody()))
return nil, err