Rename Result.Headers to Result.Header.
This way, it's consistent with http.Header in the response.
diff --git a/openstack/identity/v3/tokens/requests.go b/openstack/identity/v3/tokens/requests.go
index 3a21658..dfef0ce 100644
--- a/openstack/identity/v3/tokens/requests.go
+++ b/openstack/identity/v3/tokens/requests.go
@@ -242,7 +242,7 @@
if result.Err != nil {
return result
}
- result.Headers = response.HttpResponse.Header
+ result.Header = response.HttpResponse.Header
return result
}
@@ -258,7 +258,7 @@
if result.Err != nil {
return result
}
- result.Headers = response.HttpResponse.Header
+ result.Header = response.HttpResponse.Header
return result
}
diff --git a/openstack/identity/v3/tokens/results.go b/openstack/identity/v3/tokens/results.go
index 0b6a55b..c31c52f 100644
--- a/openstack/identity/v3/tokens/results.go
+++ b/openstack/identity/v3/tokens/results.go
@@ -27,7 +27,7 @@
var token Token
// Parse the token itself from the stored headers.
- token.ID = r.Headers.Get("X-Subject-Token")
+ token.ID = r.Header.Get("X-Subject-Token")
err := mapstructure.Decode(r.Body, &response)
if err != nil {