[#1418] shard: Do not use pointers as parameters

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
Pavel Karpy 2022-05-20 21:08:59 +03:00 committed by fyrchik
parent e265ce2d52
commit 6e752f36dc
39 changed files with 205 additions and 161 deletions

View file

@ -20,17 +20,15 @@ type DeleteRes struct{}
// WithAddresses is a Delete option to set the addresses of the objects to delete.
//
// Option is required.
func (p *DeletePrm) WithAddresses(addr ...oid.Address) *DeletePrm {
func (p *DeletePrm) WithAddresses(addr ...oid.Address) {
if p != nil {
p.addr = append(p.addr, addr...)
}
return p
}
// Delete removes data from the shard's writeCache, metaBase and
// blobStor.
func (s *Shard) Delete(prm *DeletePrm) (*DeleteRes, error) {
func (s *Shard) Delete(prm DeletePrm) (*DeleteRes, error) {
if s.GetMode() != ModeReadWrite {
return nil, ErrReadOnlyMode
}