aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2018-05-02 22:20:54 +0200
committerStefan Majewsky <majewsky@gmx.net>2018-05-02 22:20:54 +0200
commit714ac4546a1378fec6fbec94096c6ec315214081 (patch)
tree176e2d843bed0bb58ae7f0ed1c7f0f6e4cdba65f
parentf57a07087a53a14e9dbf6e1e01da88e4c0dc34a5 (diff)
downloadgo-schwift-714ac4546a1378fec6fbec94096c6ec315214081.tar.gz
remove Object.MoveTo
It's trivially replicable by clients, and has an ugly API that I don't want to commit on at this point.
-rw-r--r--object.go12
-rw-r--r--tests/object_test.go7
2 files changed, 0 insertions, 19 deletions
diff --git a/object.go b/object.go
index cd5c1c9..a7b19df 100644
--- a/object.go
+++ b/object.go
@@ -458,15 +458,3 @@ func (o *Object) CopyTo(target *Object, opts *RequestOptions) error {
}
return err
}
-
-//MoveTo moves the object on the server side, using a COPY request followed by
-//a DELETE request on the source object.
-//
-//A successful move implies Invalidate() on both the source and target side.
-func (o *Object) MoveTo(target *Object, copyOpts *RequestOptions, deleteOpts *RequestOptions) error {
- err := o.CopyTo(target, copyOpts)
- if err != nil {
- return err
- }
- return o.Delete(nil, deleteOpts)
-}
diff --git a/tests/object_test.go b/tests/object_test.go
index 251db9f..c7e710f 100644
--- a/tests/object_test.go
+++ b/tests/object_test.go
@@ -199,13 +199,6 @@ func TestObjectCopyMove(t *testing.T) {
expectObjectExistence(t, obj1, true)
expectObjectExistence(t, obj2, true)
expectObjectContent(t, obj2, objectExampleContent)
-
- obj3 := c.Object("location3")
- expectSuccess(t, obj1.MoveTo(obj3, nil, nil))
- expectObjectExistence(t, obj1, false)
- expectObjectExistence(t, obj2, true)
- expectObjectExistence(t, obj3, true)
- expectObjectContent(t, obj3, objectExampleContent)
})
}