1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-06-17 04:30:03 +02:00

abi.go: Use fmt.Errorf() instead of errors.New()

This commit is contained in:
Henrik Hautakoski 2022-11-28 15:27:42 +01:00
parent 621aeedbd0
commit 462f4c388c

5
abi.go
View file

@ -2,7 +2,6 @@ package main
import (
"encoding/json"
"errors"
"fmt"
"time"
@ -31,13 +30,13 @@ func GetAbi(account eos.AccountName) (*eos.ABI, error) {
if err != nil {
resp, err := eosClient.GetABI(eosClientCtx, account)
if err != nil {
return nil, errors.New(fmt.Sprintf("api: %s", err))
return nil, fmt.Errorf("api: %s", err)
}
abi = &resp.ABI
err = abiCache.Set(key, abi, time.Hour)
if err != nil {
return nil, errors.New(fmt.Sprintf("cache: %s", err))
return nil, fmt.Errorf("cache: %s", err)
}
}
return abi, nil