[#38] sdk/object: Add CutPayload method to RawObject
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
becb9148c1
commit
2f57855775
1 changed files with 13 additions and 0 deletions
|
@ -57,3 +57,16 @@ func (o *RawObject) Object() *Object {
|
|||
|
||||
return nil
|
||||
}
|
||||
|
||||
// CutPayload returns RawObject w/ empty payload.
|
||||
//
|
||||
// Changes of non-payload fields affect source object.
|
||||
func (o *RawObject) CutPayload() *RawObject {
|
||||
if o != nil {
|
||||
return &RawObject{
|
||||
RawObject: o.RawObject.CutPayload(),
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue