From 62ea09de889bd5c5048540ab4c44fcdb5002467a Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Fri, 27 Apr 2018 19:55:34 +0200 Subject: add Account.isEqualTo, Container.isEqualTo --- bulk.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'bulk.go') diff --git a/bulk.go b/bulk.go index e63366d..42fb0b7 100644 --- a/bulk.go +++ b/bulk.go @@ -145,14 +145,12 @@ func makeBulkObjectError(fullName string, statusCode int) BulkObjectError { func (a *Account) BulkDelete(objects []*Object, containers []*Container, opts *RequestOptions) (numDeleted int, numNotFound int, deleteError error) { //validate that all given objects are in this account for _, obj := range objects { - other := obj.Container().Account() - if other.baseURL != a.baseURL || other.name != a.name { + if !a.isEqualTo(obj.Container().Account()) { return 0, 0, ErrAccountMismatch } } for _, container := range containers { - other := container.Account() - if other.baseURL != a.baseURL || other.name != a.name { + if !a.isEqualTo(container.Account()) { return 0, 0, ErrAccountMismatch } } -- cgit v1.2.3