summaryrefslogtreecommitdiff
path: root/bulk.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2026-07-21 14:23:40 +0200
committerStefan Majewsky <majewsky@gmx.net>2026-07-21 14:23:40 +0200
commit044e297413066262c54beb33e98d0e498178897b (patch)
tree8fa631ebe958f0a480bbe9445ac83c13b36f1d97 /bulk.go
parentdc7bd11d855f0b3266612a18606801f4e09ecc09 (diff)
downloadgo-schwift-044e297413066262c54beb33e98d0e498178897b.tar.gz
use http.MethodFoo constants where possible
Diffstat (limited to 'bulk.go')
-rw-r--r--bulk.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/bulk.go b/bulk.go
index a21f199..7c08345 100644
--- a/bulk.go
+++ b/bulk.go
@@ -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},