李伟乐 2 years ago
parent 25c38491fe
commit 1a309b0b39
  1. 6
      main.go

@ -90,7 +90,7 @@ func (u *Kit) genGet(serverName string, t *protogen.GeneratedFile, m *protogen.M
return
}
h := func(ctx context.Context, a any) (any, error) {
return srv.List(ctx, a.(*`, m.Input.GoIdent.GoName, `))
return srv.`, m.GoName, `(ctx, a.(*`, m.Input.GoIdent.GoName, `))
}
out, err := middleware.HttpMiddleware(c, h, m...)(c, &post)
if err != nil {
@ -115,7 +115,7 @@ func (u *Kit) genPost(serverName string, t *protogen.GeneratedFile, m *protogen.
return
}
h := func(ctx context.Context, a any) (any, error) {
return srv.List(ctx, a.(*`, m.Input.GoIdent.GoName, `))
return srv.`, m.GoName, `(ctx, a.(*`, m.Input.GoIdent.GoName, `))
}
out, err := middleware.HttpMiddleware(c, h, m...)(c, &post)
if err != nil {
@ -140,7 +140,7 @@ func (u *Kit) genDelete(serverName string, t *protogen.GeneratedFile, m *protoge
return
}
h := func(ctx context.Context, a any) (any, error) {
return srv.List(ctx, a.(*`, m.Input.GoIdent.GoName, `))
return srv.`, m.GoName, `(ctx, a.(*`, m.Input.GoIdent.GoName, `))
}
out, err := middleware.HttpMiddleware(c, h, m...)(c, &post)
if err != nil {

Loading…
Cancel
Save