[#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,6 +1,8 @@
package netmap
import "github.com/pkg/errors"
import (
"fmt"
)
// NewEpochArgs groups the arguments
// of new epoch invocation call.
@ -16,8 +18,8 @@ func (a *NewEpochArgs) SetEpochNumber(v int64) {
// NewEpoch invokes the call of new epoch method
// of NeoFS Netmap contract.
func (c *Client) NewEpoch(args NewEpochArgs) error {
return errors.Wrapf(c.client.Invoke(
c.addPeerMethod,
args.number,
), "could not invoke method (%s)", c.newEpochMethod)
if err := c.client.Invoke(c.addPeerMethod, args.number); err != nil {
return fmt.Errorf("could not invoke method (%s): %w", c.newEpochMethod, err)
}
return nil
}