fix: eth: incorrect struct tags (#10309)

This commit is contained in:
Steven Allen 2023-02-17 15:06:58 -08:00 committed by GitHub
parent 73102e9432
commit e51f3e9b15
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View File

@ -117,7 +117,7 @@ type EthSubscriberStruct struct {
} }
type EthSubscriberMethods 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 { type EthSubscriberStub struct {

View File

@ -307,7 +307,8 @@ type {{.Num}}Struct struct {
type {{.Num}}Methods struct { type {{.Num}}Methods struct {
{{range .Methods}} {{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}} {{end}}
} }

View File

@ -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 { func testV0RetrievalAsFile(ctx context.Context, client *kit.TestFullNode, retOrder api0.RetrievalOrder, tempDir string) error {
out := tempDir + string(os.PathSeparator) + "exp-test" + retOrder.Root.String() 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{ err := cv0.ClientRetrieve(ctx, retOrder, &api.FileRef{
Path: out, Path: out,
}) })
@ -220,7 +220,7 @@ func tesV0RetrievalAsCar(ctx context.Context, client *kit.TestFullNode, retOrder
} }
defer out.Close() //nolint:errcheck 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{ err = cv0.ClientRetrieve(ctx, retOrder, &api.FileRef{
Path: out.Name(), Path: out.Name(),
IsCAR: true, IsCAR: true,