forked from TrueCloudLab/frostfs-sdk-go
[#131] client: Add ID suffix to ResObjectPut.ReadStoredObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
b508f3b71e
commit
8d734d1020
2 changed files with 3 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue