no naked returns in go; fix auth v3 unit tests
diff --git a/openstack/orchestration/v1/stacks/requests.go b/openstack/orchestration/v1/stacks/requests.go
index 46d0f46..91f38ee 100644
--- a/openstack/orchestration/v1/stacks/requests.go
+++ b/openstack/orchestration/v1/stacks/requests.go
@@ -93,6 +93,7 @@
return
}
_, r.Err = c.Post(createURL(c), b, &r.Body, nil)
+ return
}
// AdoptOptsBuilder is the interface options structs have to satisfy in order
@@ -181,6 +182,7 @@
return
}
_, r.Err = c.Post(adoptURL(c), b, &r.Body, nil)
+ return
}
// SortDir is a type for specifying in which direction to sort a list of stacks.
@@ -252,10 +254,9 @@
}
// Get retreives a stack based on the stack name and stack ID.
-func Get(c *gophercloud.ServiceClient, stackName, stackID string) GetResult {
- var r GetResult
+func Get(c *gophercloud.ServiceClient, stackName, stackID string) (r GetResult) {
_, r.Err = c.Get(getURL(c, stackName, stackID), &r.Body, nil)
- return r
+ return
}
// UpdateOptsBuilder is the interface options structs have to satisfy in order
@@ -336,11 +337,13 @@
return
}
_, r.Err = c.Put(updateURL(c, stackName, stackID), b, nil, nil)
+ return
}
// Delete deletes a stack based on the stack name and stack ID.
func Delete(c *gophercloud.ServiceClient, stackName, stackID string) (r DeleteResult) {
_, r.Err = c.Delete(deleteURL(c, stackName, stackID), nil)
+ return
}
// PreviewOptsBuilder is the interface options structs have to satisfy in order
@@ -423,6 +426,7 @@
_, r.Err = c.Post(previewURL(c), b, &r.Body, &gophercloud.RequestOpts{
OkCodes: []int{200},
})
+ return
}
// Abandon deletes the stack with the provided stackName and stackID, but leaves its
@@ -432,4 +436,5 @@
JSONResponse: &r.Body,
OkCodes: []int{200},
})
+ return
}