[#1786] engine: Unify parameter setters

Signed-off-by: Evgenii Stratonikov <evgeniy@morphbits.ru>
This commit is contained in:
Evgenii Stratonikov 2022-09-14 17:36:37 +03:00 committed by fyrchik
parent b064fb24d8
commit 5321f8ef9c
7 changed files with 16 additions and 42 deletions

View file

@ -25,18 +25,14 @@ type HeadRes struct {
//
// Option is required.
func (p *HeadPrm) WithAddress(addr oid.Address) {
if p != nil {
p.addr = addr
}
p.addr = addr
}
// WithRaw is a Head option to set raw flag value. If flag is unset, then Head
// returns the header of the virtual object, otherwise it returns SplitInfo of the virtual
// object.
func (p *HeadPrm) WithRaw(raw bool) {
if p != nil {
p.raw = raw
}
p.raw = raw
}
// Header returns the requested object header.