diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2018-04-27 19:55:34 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2018-04-27 19:55:34 +0200 |
| commit | 62ea09de889bd5c5048540ab4c44fcdb5002467a (patch) | |
| tree | 36920c8d3c8384071f209d2731c8c3f58fc45c5a /bulk.go | |
| parent | 61cbe4314ea1f626a8b785628d053e2af52c1ddd (diff) | |
| download | go-schwift-62ea09de889bd5c5048540ab4c44fcdb5002467a.tar.gz | |
add Account.isEqualTo, Container.isEqualTo
Diffstat (limited to 'bulk.go')
| -rw-r--r-- | bulk.go | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 } } |
