[#521] *: use stdlib errors package

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
Evgenii Stratonikov 2021-05-18 11:12:51 +03:00 committed by Alex Vanin
parent 43e575cec2
commit 71b87155ef
171 changed files with 825 additions and 674 deletions

View file

@ -1,8 +1,9 @@
package shard
import (
"fmt"
"github.com/nspcc-dev/neofs-api-go/pkg/container"
"github.com/pkg/errors"
)
type ContainerSizePrm struct {
@ -28,7 +29,7 @@ func (r *ContainerSizeRes) Size() uint64 {
func (s *Shard) ContainerSize(prm *ContainerSizePrm) (*ContainerSizeRes, error) {
size, err := s.metaBase.ContainerSize(prm.cid)
if err != nil {
return nil, errors.Wrap(err, "could not get container size")
return nil, fmt.Errorf("could not get container size: %w", err)
}
return &ContainerSizeRes{