From 09916f21b551634a052372076ce39b5be51d8950 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 11 Dec 2020 11:23:23 +0300 Subject: [PATCH] [#243] cmd/cli: Write tombstone address in Object.Delete cmd Signed-off-by: Leonard Lyubich --- cmd/neofs-cli/modules/object.go | 5 +++-- go.mod | 2 +- go.sum | Bin 60710 -> 60710 bytes 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/cmd/neofs-cli/modules/object.go b/cmd/neofs-cli/modules/object.go index cea12685f3..c36386b407 100644 --- a/cmd/neofs-cli/modules/object.go +++ b/cmd/neofs-cli/modules/object.go @@ -248,7 +248,8 @@ func deleteObject(cmd *cobra.Command, _ []string) error { if err != nil { return err } - err = cli.DeleteObject(ctx, + + tombstoneAddr, err := client.DeleteObject(cli, ctx, new(client.DeleteObjectParams).WithAddress(objAddr), client.WithTTL(getTTL()), client.WithSession(tok), @@ -258,7 +259,7 @@ func deleteObject(cmd *cobra.Command, _ []string) error { } cmd.Println("Object removed successfully.") - cmd.Printf(" ID: %s\n CID: %s\n", objAddr.ObjectID(), objAddr.ContainerID()) + cmd.Printf(" ID: %s\n CID: %s\n", tombstoneAddr.ObjectID(), tombstoneAddr.ContainerID()) return nil } diff --git a/go.mod b/go.mod index 2d3b22865f..ad6069bdfc 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( github.com/multiformats/go-multihash v0.0.13 // indirect github.com/nspcc-dev/hrw v1.0.9 github.com/nspcc-dev/neo-go v0.91.1-pre.0.20201030072836-71216865717b - github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201210152623-803c91b3eb2b + github.com/nspcc-dev/neofs-api-go v1.20.3-0.20201211081945-1bc91466aa7b github.com/nspcc-dev/neofs-crypto v0.3.0 github.com/nspcc-dev/tzhash v1.4.0 github.com/panjf2000/ants/v2 v2.3.0 diff --git a/go.sum b/go.sum index 51bd1a9c83448091246753ec4afe1114afce4ccc..44eb3324ea35f454d3e37f43f355d2477d4daa85 100644 GIT binary patch delta 106 zcmZ2>i+R~C<_%ACoDB^u3@uGebq$k}Ee%b~%n}pLlN2%xtqeRFcgU$1e t(#y*8wNt|VEex_vEb~H&0t<~IbE_i!EIsv2CU3|w6~NF delta 106 zcmZ2>i+R~C<_%ACoDB?3jm(UUbuA2xlPwLCj8l`0k`yuwt&)pEi;S`yElko3k^>Wy tA|3rq3`#>H{X%j|jVnAYqw<{$oI;)Q^8-U1CvV6x6~