[#155] sdk/object: Add Object to RawObject converter

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2020-09-22 15:10:01 +03:00 committed by Leonard Lyubich
parent cecdeeac73
commit 14fa89b819

View file

@ -22,6 +22,11 @@ func NewRawFromV2(oV2 *object.Object) *RawObject {
}
}
// NewRawFrom wraps Object instance to RawObject.
func NewRawFrom(obj *Object) *RawObject {
return NewRawFromV2(obj.ToV2())
}
// NewRaw creates and initializes blank RawObject.
//
// Works similar as NewRawFromV2(new(Object)).