From 21fc85540ac590e416c6b75b2a2682289b42d033 Mon Sep 17 00:00:00 2001 From: Leonard Lyubich Date: Tue, 22 Sep 2020 17:56:53 +0300 Subject: [PATCH] [#38] localstore: Finalize object to meta converter Use CutPayload method of RawObject in order to make object meta structure from source object. Signed-off-by: Leonard Lyubich --- pkg/local_object_storage/localstore/meta.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/pkg/local_object_storage/localstore/meta.go b/pkg/local_object_storage/localstore/meta.go index 1db193c08..6c99ca122 100644 --- a/pkg/local_object_storage/localstore/meta.go +++ b/pkg/local_object_storage/localstore/meta.go @@ -46,13 +46,7 @@ func metaFromObject(o *object.Object) *ObjectMeta { meta := new(ObjectMeta) meta.savedAtEpoch = 10 - raw := object.NewRaw() - raw.SetID(o.GetID()) - raw.SetContainerID(o.GetContainerID()) - raw.SetOwnerID(o.GetOwnerID()) - // TODO: set other meta fields - - meta.head = raw.Object() + meta.head = object.NewRawFromObject(o).CutPayload().Object() return meta }