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:
parent
621aeedbd0
commit
462f4c388c
1 changed files with 2 additions and 3 deletions
5
abi.go
5
abi.go
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue