From f9749638e3393f471d7e28362795689bf37cc023 Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Mon, 30 Apr 2018 14:14:56 +0200 Subject: revamp the LargeObject API I thought about this some more, and I believe the Writer-based approach in the previous version of the LargeObject API does not scale: It makes it very hard to write code that uploads segments without resorting to a buffer the same size as the segments. I don't want gigabyte-scale buffers filling up my RAM, so this commit switches to a different API based on Readers. LargeObject.Append() now behaves very similar to Object.Upload(), which I find quite nice. --- tests/bulk_delete_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/bulk_delete_test.go') diff --git a/tests/bulk_delete_test.go b/tests/bulk_delete_test.go index c498419..dfe8468 100644 --- a/tests/bulk_delete_test.go +++ b/tests/bulk_delete_test.go @@ -77,7 +77,7 @@ func createTestObjects(c *schwift.Container) ([]*schwift.Object, error) { var objs []*schwift.Object for idx := 1; idx <= 5; idx++ { obj := c.Object(fmt.Sprintf("object%d", idx)) - err := obj.Upload(strings.NewReader("example"), nil) + err := obj.Upload(strings.NewReader("example"), nil, nil) if err != nil { return nil, err } -- cgit v1.2.3