Skip to content

Commit

Permalink
Fix Gomu's call response (micro#2251)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AuditeMarlow committed Sep 8, 2021
1 parent 440aa4a commit a36f52c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/gomu/cmd/cli/call/call.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a36f52c

Please sign in to comment.