forked from TrueCloudLab/frostfs-node
[#481] Update frostfs-sdk-go and error pointer receivers
Signed-off-by: Alejandro Lopez <a.lopez@yadro.com>
This commit is contained in:
parent
de3d1eb99c
commit
5b7e4a51b7
77 changed files with 265 additions and 313 deletions
|
@ -2,12 +2,11 @@ package tsourse
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
|
||||
getsvc "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/get"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/services/object/util"
|
||||
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client"
|
||||
objectSDK "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object"
|
||||
oid "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/object/id"
|
||||
)
|
||||
|
@ -68,7 +67,7 @@ func (s Source) Tombstone(ctx context.Context, a oid.Address, _ uint64) (*object
|
|||
|
||||
err := s.s.Head(ctx, headPrm)
|
||||
switch {
|
||||
case errors.As(err, new(apistatus.ObjectNotFound)) || errors.As(err, new(apistatus.ObjectAlreadyRemoved)):
|
||||
case client.IsErrObjectNotFound(err) || client.IsErrObjectAlreadyRemoved(err):
|
||||
return nil, nil
|
||||
case err != nil:
|
||||
return nil, fmt.Errorf("could not get tombstone from the source: %w", err)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue