From 8d734d1020e57f02ed80a3ee41a9d79406b0b809 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Fri, 11 Feb 2022 18:16:04 +0300 Subject: [PATCH] [#131] client: Add ID suffix to `ResObjectPut.ReadStoredObject` Signed-off-by: Leonard Lyubich --- client/object_put.go | 4 ++-- pool/pool.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/object_put.go b/client/object_put.go index 68a67d3..4937bad 100644 --- a/client/object_put.go +++ b/client/object_put.go @@ -28,9 +28,9 @@ type ResObjectPut struct { resp v2object.PutResponse } -// ReadStoredObject reads identifier of the saved object. +// ReadStoredObjectID reads identifier of the saved object. // Returns false if ID is missing (not read). -func (x *ResObjectPut) ReadStoredObject(id *oid.ID) bool { +func (x *ResObjectPut) ReadStoredObjectID(id *oid.ID) bool { idv2 := x.resp.GetBody().GetObjectID() if idv2 == nil { return false diff --git a/pool/pool.go b/pool/pool.go index ac10e4f..3e53fb9 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -793,7 +793,7 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read var id oid.ID - if !res.ReadStoredObject(&id) { + if !res.ReadStoredObjectID(&id) { return nil, errors.New("missing ID of the stored object") }