Skip to content

Commit

Permalink
upgrade go version to 1.18
Browse files Browse the repository at this point in the history
  • Loading branch information
scottafk committed Mar 30, 2022
1 parent 48e791e commit 7e88c4a
Show file tree
Hide file tree
Showing 90 changed files with 499 additions and 518 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/IBAX-io/go-ibax

go 1.17
go 1.18

require (
github.com/360EntSecGroup-Skylar/excelize v1.4.1
Expand Down
9 changes: 0 additions & 9 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA
github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/centrifugal/gocent v2.2.0+incompatible h1:49oQLm1CDojd8vgz2w5RrECgW3Ew+Z5muIQGIggI2Vk=
github.com/centrifugal/gocent v2.2.0+incompatible/go.mod h1:gtbj3+fMApCIcaGmGvk2BinwEauUtGeu8YZPLcedOvQ=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
Expand Down Expand Up @@ -351,7 +350,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFb
github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q=
github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/api v1.11.0/go.mod h1:XjsvQN+RJGWI2TWy1/kqaE16HrR2J/FWgkYjdZQsX9M=
github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0=
github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
Expand Down Expand Up @@ -407,7 +405,6 @@ github.com/ipfs/go-ipfs-api v0.3.0/go.mod h1:A1naQGm0Jg01GxDq7oDyVSZxt20SuRTNIBF
github.com/ipfs/go-ipfs-files v0.0.9 h1:OFyOfmuVDu9c5YtjSDORmwXzE6fmZikzZpzsnNkgFEg=
github.com/ipfs/go-ipfs-files v0.0.9/go.mod h1:aFv2uQ/qxWpL/6lidWvnSQmaVqCrf0TBGoUr+C1Fo84=
github.com/ipfs/go-ipfs-util v0.0.2/go.mod h1:CbPtkWJzjLdEcezDns2XYaehFVNXG9zrdrtMecczcsQ=
github.com/jackc/chunkreader v1.0.0 h1:4s39bBR8ByfqH+DKm8rQA3E1LHZWB9XWcrz8fqaZbe0=
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
Expand All @@ -429,7 +426,6 @@ github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5W
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
github.com/jackc/pgproto3 v1.1.0 h1:FYYE4yRw+AgI8wXIinMlNjBbp/UitDJwfj5LqqewP1A=
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
Expand Down Expand Up @@ -725,7 +721,6 @@ github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQD
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
github.com/sagikazarmark/crypt v0.3.0/go.mod h1:uD/D+6UF4SrIR1uGEv7bBNkNqLGqUr43MRiaGWX1Nig=
github.com/sagikazarmark/crypt v0.4.0/go.mod h1:ALv2SRj7GxYV4HO9elxH9nS6M9gW+xDNxqmyJ6RfDFM=
github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
Expand Down Expand Up @@ -964,7 +959,6 @@ golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20210813160813-60bc85c4be6d/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f h1:hEYJvxw1lSnWIl8X9ofsYMklzaDs90JI2az5YMd4fPM=
golang.org/x/net v0.0.0-20211216030914-fe4d6282115f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
Expand Down Expand Up @@ -1079,7 +1073,6 @@ golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211205182925-97ca703d548d/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e h1:fLOSk5Q00efkSvAm+4xcoXD+RRmLmmulPn5I3Y9F2EM=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
Expand Down Expand Up @@ -1205,7 +1198,6 @@ google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdr
google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=
google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
google.golang.org/api v0.62.0/go.mod h1:dKmwPCydfsad4qCH08MSdgWjfHOyfpd4VtDGgRFdavw=
google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
Expand Down Expand Up @@ -1310,7 +1302,6 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.43.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand Down
2 changes: 1 addition & 1 deletion packages/api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *Client) Prefix() string {
return converter.Int64ToStr(c.EcosystemID)
}

func jsonResponse(w http.ResponseWriter, v interface{}) {
func jsonResponse(w http.ResponseWriter, v any) {
jsonResult, err := json.Marshal(v)
if err != nil {
log.WithFields(log.Fields{"type": consts.JSONMarshallError, "error": err}).Error("marhsalling http response to json")
Expand Down
36 changes: 18 additions & 18 deletions packages/api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func sendRawRequest(rtype, url string, form *url.Values) ([]byte, error) {
return data, nil
}

func sendRequest(rtype, url string, form *url.Values, v interface{}) error {
func sendRequest(rtype, url string, form *url.Values, v any) error {
data, err := sendRawRequest(rtype, url, form)
if err != nil {
return err
Expand All @@ -95,11 +95,11 @@ func sendRequest(rtype, url string, form *url.Values, v interface{}) error {
return json.Unmarshal(data, v)
}

func sendGet(url string, form *url.Values, v interface{}) error {
func sendGet(url string, form *url.Values, v any) error {
return sendRequest("GET", url, form, v)
}

func sendPost(url string, form *url.Values, v interface{}) error {
func sendPost(url string, form *url.Values, v any) error {
return sendRequest("POST", url, form, v)
}

Expand Down Expand Up @@ -317,7 +317,7 @@ type getter interface {
Get(string) string
}

type contractParams map[string]interface{}
type contractParams map[string]any

func (cp *contractParams) Get(key string) string {
if _, ok := (*cp)[key]; !ok {
Expand All @@ -326,7 +326,7 @@ func (cp *contractParams) Get(key string) string {
return fmt.Sprintf("%v", (*cp)[key])
}

func (cp *contractParams) GetRaw(key string) interface{} {
func (cp *contractParams) GetRaw(key string) any {
return (*cp)[key]
}

Expand All @@ -336,7 +336,7 @@ func postTxResult(name string, form getter) (id int64, msg string, err error) {
return
}

params := make(map[string]interface{})
params := make(map[string]any)
for _, field := range contract.Fields {
name := field.Name
value := form.Get(name)
Expand All @@ -353,11 +353,11 @@ func postTxResult(name string, form getter) (id int64, msg string, err error) {
case "float":
params[name], err = strconv.ParseFloat(value, 64)
case "array":
var v interface{}
var v any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "map":
var v map[string]interface{}
var v map[string]any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "string", "money":
Expand Down Expand Up @@ -428,7 +428,7 @@ func postTxResultMultipart(name string, form getter) (id int64, msg string, err
return
}

params := make(map[string]interface{})
params := make(map[string]any)
for _, field := range contract.Fields {
name := field.Name
value := form.Get(name)
Expand All @@ -445,11 +445,11 @@ func postTxResultMultipart(name string, form getter) (id int64, msg string, err
case "float":
params[name], err = strconv.ParseFloat(value, 64)
case "array":
var v interface{}
var v any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "map":
var v map[string]interface{}
var v map[string]any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "string", "money":
Expand Down Expand Up @@ -536,7 +536,7 @@ func postSignTxResult(name string, form getter) (id int64, msg string, err error
return
}

params := make(map[string]interface{})
params := make(map[string]any)
for _, field := range contract.Fields {
name := field.Name
value := form.Get(name)
Expand All @@ -553,11 +553,11 @@ func postSignTxResult(name string, form getter) (id int64, msg string, err error
case "float":
params[name], err = strconv.ParseFloat(value, 64)
case "array":
var v interface{}
var v any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "map":
var v map[string]interface{}
var v map[string]any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "string", "money":
Expand Down Expand Up @@ -626,7 +626,7 @@ func postTxResult2(name string, form getter) (id int64, msg string, err error) {
return
}

params := make(map[string]interface{})
params := make(map[string]any)
for _, field := range contract.Fields {
name := field.Name
value := form.Get(name)
Expand All @@ -643,11 +643,11 @@ func postTxResult2(name string, form getter) (id int64, msg string, err error) {
case "float":
params[name], err = strconv.ParseFloat(value, 64)
case "array":
var v interface{}
var v any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "map":
var v map[string]interface{}
var v map[string]any
err = json.Unmarshal([]byte(value), &v)
params[name] = v
case "string", "money":
Expand Down Expand Up @@ -761,7 +761,7 @@ func TestGetAvatar(t *testing.T) {
assert.Equal(t, expectedMime, mime, "content type must be a '%s' but returns '%s'", expectedMime, mime)
}

func sendMultipart(url string, files map[string][]byte, v interface{}) error {
func sendMultipart(url string, files map[string][]byte, v any) error {
body := new(bytes.Buffer)
writer := multipart.NewWriter(body)

Expand Down
2 changes: 1 addition & 1 deletion packages/api/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func parseJWTToken(header string) (*jwt.Token, error) {
return nil, errJWTAuthValue
}

return jwt.ParseWithClaims(header, &JWTClaims{}, func(token *jwt.Token) (interface{}, error) {
return jwt.ParseWithClaims(header, &JWTClaims{}, func(token *jwt.Token) (any, error) {
if _, ok := token.Method.(*jwt.SigningMethodHMAC); !ok {
return nil, fmt.Errorf("Unexpected signing method: %v", token.Header["alg"])
}
Expand Down
22 changes: 11 additions & 11 deletions packages/api/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ func getBlockInfoHandler(w http.ResponseWriter, r *http.Request) {
}

type TxInfo struct {
Hash []byte `json:"hash"`
ContractName string `json:"contract_name"`
Params map[string]interface{} `json:"params"`
KeyID int64 `json:"key_id"`
Hash []byte `json:"hash"`
ContractName string `json:"contract_name"`
Params map[string]any `json:"params"`
KeyID int64 `json:"key_id"`
}

type blocksTxInfoForm struct {
Expand Down Expand Up @@ -167,13 +167,13 @@ func getBlocksTxInfoHandler(w http.ResponseWriter, r *http.Request) {
}

type TxDetailedInfo struct {
Hash []byte `json:"hash"`
ContractName string `json:"contract_name"`
Params map[string]interface{} `json:"params"`
KeyID int64 `json:"key_id"`
Time int64 `json:"time"`
Type byte `json:"type"`
Size string `json:"size"`
Hash []byte `json:"hash"`
ContractName string `json:"contract_name"`
Params map[string]any `json:"params"`
KeyID int64 `json:"key_id"`
Time int64 `json:"time"`
Type byte `json:"type"`
Size string `json:"size"`
}

type BlockHeaderInfo struct {
Expand Down
4 changes: 2 additions & 2 deletions packages/api/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const (
contextKeyClient
)

func setContext(r *http.Request, key, value interface{}) *http.Request {
func setContext(r *http.Request, key, value any) *http.Request {
return r.WithContext(context.WithValue(r.Context(), key, value))
}

func getContext(r *http.Request, key interface{}) interface{} {
func getContext(r *http.Request, key any) any {
return r.Context().Value(key)
}

Expand Down
4 changes: 2 additions & 2 deletions packages/api/database.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ type rowsInfo struct {
}

type RowsListResult struct {
Count int64 `json:"count"`
List []map[string]interface{} `json:"list"`
Count int64 `json:"count"`
List []map[string]any `json:"list"`
}

func (f *tableInfoForm) Validate(r *http.Request) error {
Expand Down
2 changes: 1 addition & 1 deletion packages/api/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func (et errType) Error() string {
return et.Err
}

func (et errType) Errorf(v ...interface{}) errType {
func (et errType) Errorf(v ...any) errType {
et.Message = fmt.Sprintf(et.Message, v...)
return et
}
2 changes: 1 addition & 1 deletion packages/api/import_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ func ImportApps(path, appname string) error {
if err != nil {
return err
}
var val = make(map[interface{}]interface{})
var val = make(map[any]any)
val["Body"] = apps
val["MimeType"] = "application/json"
val["Name"] = appname + ".json"
Expand Down
4 changes: 2 additions & 2 deletions packages/api/interface_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ func TestGetInterfaceRow(t *testing.T) {
{"interface/snippet/", "NewSnippet", []string{"Name", "Value", "Conditions"}},
}

checkEqualAttrs := func(form url.Values, result map[string]interface{}, equalKeys []string) {
checkEqualAttrs := func(form url.Values, result map[string]any, equalKeys []string) {
for _, key := range equalKeys {
v := result[strings.ToLower(key)]
assert.EqualValues(t, form.Get(key), v)
Expand All @@ -47,7 +47,7 @@ func TestGetInterfaceRow(t *testing.T) {
"Conditions": {"true"},
}
assert.NoError(t, postTx(c.contract, &form))
result := map[string]interface{}{}
result := map[string]any{}
assert.NoError(t, sendGet(c.url+name, &url.Values{}, &result))
checkEqualAttrs(form, result, c.equalAttrs)
}
Expand Down
2 changes: 1 addition & 1 deletion packages/api/ipfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ func filesLs(w http.ResponseWriter, r *http.Request) {
}

s := shell.NewShell(conf.IpfsHost())
var out interface{}
var out any
err := s.Request("files/ls").Option("arg", leadingSlash+converter.Int64ToStr(client.KeyID)+form.Paths).Option("l", true).
Exec(context.Background(), &out)
if err != nil {
Expand Down
6 changes: 3 additions & 3 deletions packages/api/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func getListWhereHandler(w http.ResponseWriter, r *http.Request) {
errorResponse(w, errors.New(`Where has wrong format`))
return
}
case map[string]interface{}:
case map[string]any:
where, err = qb.GetWhere(types.LoadMap(v))
if err != nil {
errorResponse(w, err)
Expand Down Expand Up @@ -260,7 +260,7 @@ func getnodeListWhereHandler(w http.ResponseWriter, r *http.Request) {
errorResponse(w, errors.New(`Where has wrong format`))
return
}
case map[string]interface{}:
case map[string]any:
where, err = qb.GetWhere(types.LoadMap(v))
if err != nil {
errorResponse(w, err)
Expand Down Expand Up @@ -354,7 +354,7 @@ func getsumWhereHandler(w http.ResponseWriter, r *http.Request) {
errorResponse(w, errors.New(`Where has wrong format`))
return
}
case map[string]interface{}:
case map[string]any:
where, err = qb.GetWhere(types.LoadMap(v))
if err != nil {
errorResponse(w, err)
Expand Down
2 changes: 1 addition & 1 deletion packages/api/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func (m Mode) loginHandler(w http.ResponseWriter, r *http.Request) {
KeyID: conf.Config.KeyID,
NetworkID: conf.Config.LocalConf.NetworkID,
},
Params: map[string]interface{}{
Params: map[string]any{
"NewPubkey": hex.EncodeToString(publicKey),
"Ecosystem": client.EcosystemID,
},
Expand Down
Loading

0 comments on commit 7e88c4a

Please sign in to comment.