Linting and comments fixes
diff --git a/openstack/orchestration/v1/stackresources/fixtures.go b/openstack/orchestration/v1/stackresources/fixtures.go
index 2273ba7..952dc54 100644
--- a/openstack/orchestration/v1/stackresources/fixtures.go
+++ b/openstack/orchestration/v1/stackresources/fixtures.go
@@ -255,7 +255,7 @@
}
// ListTypesExpected represents the expected object from a ListTypes request.
-var ListTypesExpected = resourceTypes{
+var ListTypesExpected = ResourceTypes{
"OS::Nova::Server",
"OS::Heat::RandomString",
"OS::Swift::Container",
@@ -267,7 +267,7 @@
}
// same as above, but sorted
-var SortedListTypesExpected = resourceTypes{
+var SortedListTypesExpected = ResourceTypes{
"OS::Cinder::VolumeAttachment",
"OS::Heat::RandomString",
"OS::Nova::FloatingIP",
diff --git a/openstack/orchestration/v1/stackresources/results.go b/openstack/orchestration/v1/stackresources/results.go
index 51c3c0c..6ddc766 100644
--- a/openstack/orchestration/v1/stackresources/results.go
+++ b/openstack/orchestration/v1/stackresources/results.go
@@ -206,28 +206,28 @@
return len(rts) == 0, nil
}
-// resourceTypes represents the type that holds the result of ExtractResourceTypes.
+// ResourceTypes represents the type that holds the result of ExtractResourceTypes.
// We define methods on this type to sort it before output
-type resourceTypes []string
+type ResourceTypes []string
-func (r resourceTypes) Len() int {
+func (r ResourceTypes) Len() int {
return len(r)
}
-func (r resourceTypes) Swap(i, j int) {
+func (r ResourceTypes) Swap(i, j int) {
r[i], r[j] = r[j], r[i]
}
-func (r resourceTypes) Less(i, j int) bool {
+func (r ResourceTypes) Less(i, j int) bool {
return r[i] < r[j]
}
// ExtractResourceTypes extracts and returns resource types.
-func ExtractResourceTypes(page pagination.Page) (resourceTypes, error) {
+func ExtractResourceTypes(page pagination.Page) (ResourceTypes, error) {
casted := page.(ResourceTypePage).Body
var response struct {
- ResourceTypes resourceTypes `mapstructure:"resource_types"`
+ ResourceTypes ResourceTypes `mapstructure:"resource_types"`
}
if err := mapstructure.Decode(casted, &response); err != nil {