[#243] cmd/cli: Write tombstone address in Object.Delete cmd

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-12-11 11:23:23 +03:00 committed by Alex Vanin
parent fe3906c295
commit 09916f21b5
3 changed files with 4 additions and 3 deletions

View file

@ -248,7 +248,8 @@ func deleteObject(cmd *cobra.Command, _ []string) error {
if err != nil { if err != nil {
return err return err
} }
err = cli.DeleteObject(ctx,
tombstoneAddr, err := client.DeleteObject(cli, ctx,
new(client.DeleteObjectParams).WithAddress(objAddr), new(client.DeleteObjectParams).WithAddress(objAddr),
client.WithTTL(getTTL()), client.WithTTL(getTTL()),
client.WithSession(tok), client.WithSession(tok),
@ -258,7 +259,7 @@ func deleteObject(cmd *cobra.Command, _ []string) error {
} }
cmd.Println("Object removed successfully.") 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 return nil
} }

2
go.mod
View file

@ -17,7 +17,7 @@ require (
github.com/multiformats/go-multihash v0.0.13 // indirect github.com/multiformats/go-multihash v0.0.13 // indirect
github.com/nspcc-dev/hrw v1.0.9 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/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/neofs-crypto v0.3.0
github.com/nspcc-dev/tzhash v1.4.0 github.com/nspcc-dev/tzhash v1.4.0
github.com/panjf2000/ants/v2 v2.3.0 github.com/panjf2000/ants/v2 v2.3.0

BIN
go.sum

Binary file not shown.