Rename gophercloud.CommonResult references.
diff --git a/openstack/identity/v3/tokens/results.go b/openstack/identity/v3/tokens/results.go
index 1be98cb..1e6538d 100644
--- a/openstack/identity/v3/tokens/results.go
+++ b/openstack/identity/v3/tokens/results.go
@@ -1,7 +1,6 @@
package tokens
import (
- "net/http"
"time"
"github.com/mitchellh/mapstructure"
@@ -10,10 +9,7 @@
// commonResult is the deferred result of a Create or a Get call.
type commonResult struct {
- gophercloud.CommonResult
-
- // header stores the headers from the original HTTP response because token responses are returned in an X-Subject-Token header.
- header http.Header
+ gophercloud.Result
}
// Extract interprets a commonResult as a Token.
@@ -31,7 +27,7 @@
var token Token
// Parse the token itself from the stored headers.
- token.ID = r.header.Get("X-Subject-Token")
+ token.ID = r.Headers.Get("X-Subject-Token")
err := mapstructure.Decode(r.Resp, &response)
if err != nil {
@@ -52,10 +48,7 @@
// createErr quickly creates a CreateResult that reports an error.
func createErr(err error) CreateResult {
return CreateResult{
- commonResult: commonResult{
- CommonResult: gophercloud.CommonResult{Err: err},
- header: nil,
- },
+ commonResult: commonResult{Result: gophercloud.Result{Err: err}},
}
}