Skip to content

Commit a704d85

Browse files
authored
Merge pull request #184 from withchao/main
feat: adjust api call rpc
2 parents d7f7d58 + dbbb9b2 commit a704d85

File tree

3 files changed

+1
-49
lines changed

3 files changed

+1
-49
lines changed

a2r/api2rpc.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type Option[A, B any] struct {
3535
RespAfter func(*B) error
3636
}
3737

38-
func Call[A, B, C any](rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), client C, c *gin.Context, opts ...*Option[A, B]) {
38+
func Call[A, B, C any](c *gin.Context, rpc func(client C, ctx context.Context, req *A, options ...grpc.CallOption) (*B, error), client C, opts ...*Option[A, B]) {
3939
req, err := ParseRequestNotCheck[A](c)
4040
if err != nil {
4141
apiresp.GinError(c, err)

a2r/call_v2.go

-46
This file was deleted.

a2r/option.go

-2
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,3 @@ func respNilReplace[T any](data *T) error {
1717
mw.ReplaceNil(data)
1818
return nil
1919
}
20-
21-
// ------------------------------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)