[#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,7 +1,7 @@
package audit
import (
"github.com/pkg/errors"
"fmt"
)
// PutAuditResultArgs groups the arguments
@ -19,8 +19,13 @@ func (g *PutAuditResultArgs) SetRawResult(v []byte) {
// PutAuditResult invokes the call of "put audit result" method
// of NeoFS Audit contract.
func (c *Client) PutAuditResult(args PutAuditResultArgs) error {
return errors.Wrapf(c.client.Invoke(
err := c.client.Invoke(
c.putResultMethod,
args.rawResult,
), "could not invoke method (%s)", c.putResultMethod)
)
if err != nil {
return fmt.Errorf("could not invoke method (%s): %w", c.putResultMethod, err)
}
return nil
}