1
0
Fork 0
mirror of https://github.com/eosswedenorg/thalos synced 2026-07-04 12:03:41 +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 ( import (
"encoding/json" "encoding/json"
"errors"
"fmt" "fmt"
"time" "time"
@ -31,13 +30,13 @@ func GetAbi(account eos.AccountName) (*eos.ABI, error) {
if err != nil { if err != nil {
resp, err := eosClient.GetABI(eosClientCtx, account) resp, err := eosClient.GetABI(eosClientCtx, account)
if err != nil { if err != nil {
return nil, errors.New(fmt.Sprintf("api: %s", err)) return nil, fmt.Errorf("api: %s", err)
} }
abi = &resp.ABI abi = &resp.ABI
err = abiCache.Set(key, abi, time.Hour) err = abiCache.Set(key, abi, time.Hour)
if err != nil { if err != nil {
return nil, errors.New(fmt.Sprintf("cache: %s", err)) return nil, fmt.Errorf("cache: %s", err)
} }
} }
return abi, nil return abi, nil