[#131] client: Add ID suffix to `ResObjectPut.ReadStoredObject`

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
remotes/fyrchik/fix-lint
Leonard Lyubich 2022-02-11 18:16:04 +03:00 committed by LeL
parent b508f3b71e
commit 8d734d1020
2 changed files with 3 additions and 3 deletions

View File

@ -28,9 +28,9 @@ type ResObjectPut struct {
resp v2object.PutResponse 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). // 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() idv2 := x.resp.GetBody().GetObjectID()
if idv2 == nil { if idv2 == nil {
return false return false

View File

@ -793,7 +793,7 @@ func (p *pool) PutObject(ctx context.Context, hdr object.Object, payload io.Read
var id oid.ID var id oid.ID
if !res.ReadStoredObject(&id) { if !res.ReadStoredObjectID(&id) {
return nil, errors.New("missing ID of the stored object") return nil, errors.New("missing ID of the stored object")
} }