1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-07-12 22:41:07 +02:00

Fix Gomu's call response (#2251)

Gomu expects a `map[string]string` type response back, but this isn't
always the case. When Gomu calls a service endpoint that responds with,
let's say, a key where its value is a map or a list, Gomu would be
unable to decode that response. By expecting a `map[string]interface{}`
type response, Gomu is able to decode those responses as well.
This commit is contained in:
Niek den Breeje
2021-09-08 09:30:53 +02:00
committed by GitHub
parent 440aa4a1ce
commit a36f52c6d2

View File

@ -47,7 +47,7 @@ func RunCall(ctx *cli.Context) error {
c := srv.Client()
request := c.NewRequest(service, endpoint, creq, client.WithContentType("application/json"))
response := map[string]string{}
var response map[string]interface{}
if err := c.Call(context.Background(), request, &response); err != nil {
return err