[#1460] blobstor: Do not use pointers as the results
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
This commit is contained in:
parent
08bf8a68f1
commit
0e4a1beecf
11 changed files with 64 additions and 63 deletions
|
@ -29,7 +29,7 @@ func (r ExistsRes) Exists() bool {
|
|||
//
|
||||
// Returns any error encountered that did not allow
|
||||
// to completely check object existence.
|
||||
func (b *BlobStor) Exists(prm ExistsPrm) (*ExistsRes, error) {
|
||||
func (b *BlobStor) Exists(prm ExistsPrm) (ExistsRes, error) {
|
||||
// check presence in shallow dir first (cheaper)
|
||||
exists, err := b.existsBig(prm.addr)
|
||||
|
||||
|
@ -58,9 +58,10 @@ func (b *BlobStor) Exists(prm ExistsPrm) (*ExistsRes, error) {
|
|||
}
|
||||
|
||||
if err != nil {
|
||||
return nil, err
|
||||
return ExistsRes{}, err
|
||||
}
|
||||
return &ExistsRes{exists: exists}, err
|
||||
|
||||
return ExistsRes{exists: exists}, err
|
||||
}
|
||||
|
||||
// checks if object is presented in shallow dir.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue