From 8a11517cab09f372dd6ef7cc108c0c728b318b43 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Fri, 17 Feb 2023 13:55:02 -0800 Subject: [PATCH] fix: eth: incorrect struct tags --- api/proxy_gen.go | 2 +- gen/api/proxygen.go | 3 ++- itests/deals_partial_retrieval_dm-level_test.go | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/api/proxy_gen.go b/api/proxy_gen.go index 29a4e713113..5d56c177c10 100644 --- a/api/proxy_gen.go +++ b/api/proxy_gen.go @@ -117,7 +117,7 @@ type EthSubscriberStruct struct { } type EthSubscriberMethods struct { - EthSubscription func(p0 context.Context, p1 jsonrpc.RawParams) error `notify:"true"rpc_method:"eth_subscription"` + EthSubscription func(p0 context.Context, p1 jsonrpc.RawParams) error `notify:"true" rpc_method:"eth_subscription"` } type EthSubscriberStub struct { diff --git a/gen/api/proxygen.go b/gen/api/proxygen.go index 75fbc668c90..fba276372db 100644 --- a/gen/api/proxygen.go +++ b/gen/api/proxygen.go @@ -307,7 +307,8 @@ type {{.Num}}Struct struct { type {{.Num}}Methods struct { {{range .Methods}} - {{.Num}} func({{.NamedParams}}) ({{.Results}}) `+"`"+`{{range .Tags}}{{index . 0}}:"{{index . 1}}"{{end}}`+"`"+` + {{.Num}} func({{.NamedParams}}) ({{.Results}}) `+"`"+`{{$first := true}}{{range .Tags}}{{if $first}}{{$first = false}}{{else}} {{end}}{{index . 0}}:"{{index . 1}}"{{end}}`+"`"+` + {{end}} } diff --git a/itests/deals_partial_retrieval_dm-level_test.go b/itests/deals_partial_retrieval_dm-level_test.go index 246541229ee..156ed67fed6 100644 --- a/itests/deals_partial_retrieval_dm-level_test.go +++ b/itests/deals_partial_retrieval_dm-level_test.go @@ -166,7 +166,7 @@ func testDMExportAsFile(ctx context.Context, client *kit.TestFullNode, expDirect func testV0RetrievalAsFile(ctx context.Context, client *kit.TestFullNode, retOrder api0.RetrievalOrder, tempDir string) error { out := tempDir + string(os.PathSeparator) + "exp-test" + retOrder.Root.String() - cv0 := &api0.WrapperV1Full{client.FullNode} //nolint:govet + cv0 := &api0.WrapperV1Full{FullNode: client.FullNode} err := cv0.ClientRetrieve(ctx, retOrder, &api.FileRef{ Path: out, }) @@ -220,7 +220,7 @@ func tesV0RetrievalAsCar(ctx context.Context, client *kit.TestFullNode, retOrder } defer out.Close() //nolint:errcheck - cv0 := &api0.WrapperV1Full{client.FullNode} //nolint:govet + cv0 := &api0.WrapperV1Full{FullNode: client.FullNode} err = cv0.ClientRetrieve(ctx, retOrder, &api.FileRef{ Path: out.Name(), IsCAR: true,