Skip to content

Commit

Permalink
🔄 Sync from monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
mojo-machine[bot] committed Jun 25, 2024
1 parent 16fd6b2 commit e383816
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion lib/crpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ func checkResponseType(ctx context.Context, typ reflect.Type) error {
case reflect.Ptr:
elem := typ.Elem()

if elem.Kind() != reflect.Struct {
if elem.Kind() != reflect.Struct && elem.Kind() != reflect.String {
err := checkResponseType(ctx, elem)
if err != nil {
return err
Expand Down
4 changes: 0 additions & 4 deletions lib/crpc/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,6 @@ func TestWrap(t *testing.T) {
"OutputNotPointer", func(ctx context.Context) (out testOutput, err error) { return },
"response_type_invalid",
},
{
"OutputNotStructSlice", func(ctx context.Context) (out *string, err error) { return },
"response_type_invalid",
},
}

for _, test := range tests {
Expand Down

0 comments on commit e383816

Please sign in to comment.