aboutsummaryrefslogtreecommitdiff
path: root/bulk.go
diff options
context:
space:
mode:
authorSandro Jäckel <sandro.jaeckel@sap.com>2022-10-26 15:23:04 +0200
committerSandro Jäckel <sandro.jaeckel@sap.com>2022-10-28 12:55:16 +0200
commit8b38a040830109f19550e7329b82ec5caf76b321 (patch)
tree13ecc54219914102f69fb59e005a836a88f78f5c /bulk.go
parent4f67f4c0a59a850321b37a154efc9bde60539ca8 (diff)
downloadgo-schwift-8b38a040830109f19550e7329b82ec5caf76b321.tar.gz
Fix linting errors
Diffstat (limited to 'bulk.go')
-rw-r--r--bulk.go12
1 files changed, 4 insertions, 8 deletions
diff --git a/bulk.go b/bulk.go
index 3aa40db..1c4dd4a 100644
--- a/bulk.go
+++ b/bulk.go
@@ -142,7 +142,7 @@ func makeBulkObjectError(fullName string, statusCode int) BulkObjectError {
// The objects may be located in multiple containers, but they and the
// containers must all be located in the given account. (Otherwise,
// ErrAccountMismatch is returned.)
-func (a *Account) BulkDelete(objects []*Object, containers []*Container, opts *RequestOptions) (numDeleted int, numNotFound int, deleteError error) {
+func (a *Account) BulkDelete(objects []*Object, containers []*Container, opts *RequestOptions) (numDeleted, numNotFound int, deleteError error) {
//validate that all given objects are in this account
for _, obj := range objects {
if !a.IsEqualTo(obj.Container().Account()) {
@@ -202,12 +202,8 @@ func (a *Account) BulkDelete(objects []*Object, containers []*Container, opts *R
// Implementation of BulkDelete() for servers that *do not* support bulk
// deletion.
-func (a *Account) bulkDeleteSingle(objects []*Object, containers []*Container, opts *RequestOptions) (int, int, error) {
- var (
- numDeleted = 0
- numNotFound = 0
- errs []BulkObjectError
- )
+func (a *Account) bulkDeleteSingle(objects []*Object, containers []*Container, opts *RequestOptions) (numDeleted, numNotFound int, err error) {
+ var errs []BulkObjectError
handleSingleError := func(containerName, objectName string, err error) error {
if err == nil {
@@ -259,7 +255,7 @@ func (a *Account) bulkDeleteSingle(objects []*Object, containers []*Container, o
// Implementation of BulkDelete() for servers that *do* support bulk deletion.
// This function is called *after* chunking, so `len(names) <=
// account.Capabilities.BulkDelete.MaximumDeletesPerRequest`.
-func (a *Account) bulkDelete(names []string, opts *RequestOptions) (int, int, error) {
+func (a *Account) bulkDelete(names []string, opts *RequestOptions) (numDeleted, numNotFound int, err error) {
req := Request{
Method: "DELETE",
Body: strings.NewReader(strings.Join(names, "\n") + "\n"),