diff options
| author | Stefan Majewsky <majewsky@gmx.net> | 2026-07-21 14:23:40 +0200 |
|---|---|---|
| committer | Stefan Majewsky <majewsky@gmx.net> | 2026-07-21 14:23:40 +0200 |
| commit | 044e297413066262c54beb33e98d0e498178897b (patch) | |
| tree | 8fa631ebe958f0a480bbe9445ac83c13b36f1d97 /bulk.go | |
| parent | dc7bd11d855f0b3266612a18606801f4e09ecc09 (diff) | |
| download | go-schwift-044e297413066262c54beb33e98d0e498178897b.tar.gz | |
use http.MethodFoo constants where possible
Diffstat (limited to 'bulk.go')
| -rw-r--r-- | bulk.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -76,7 +76,7 @@ func (a *Account) BulkUpload(ctx context.Context, uploadPath string, format Bulk } req := Request{ - Method: "PUT", + Method: http.MethodPut, Body: contents, Options: cloneRequestOptions(opts, nil), ExpectStatusCodes: []int{200}, @@ -259,7 +259,7 @@ func (a *Account) bulkDeleteSingle(ctx context.Context, objects []*Object, conta // account.Capabilities.BulkDelete.MaximumDeletesPerRequest`. func (a *Account) bulkDelete(ctx context.Context, names []string, opts *RequestOptions) (numDeleted, numNotFound int, err error) { req := Request{ - Method: "DELETE", + Method: http.MethodDelete, Body: strings.NewReader(strings.Join(names, "\n") + "\n"), Options: cloneRequestOptions(opts, nil), ExpectStatusCodes: []int{200}, |
