From a36f52c6d2073d5116e46aeedd9eef4ea61582ad Mon Sep 17 00:00:00 2001 From: Niek den Breeje Date: Wed, 8 Sep 2021 09:30:53 +0200 Subject: [PATCH] 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. --- cmd/gomu/cmd/cli/call/call.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/gomu/cmd/cli/call/call.go b/cmd/gomu/cmd/cli/call/call.go index 303054d8..ef37ead6 100644 --- a/cmd/gomu/cmd/cli/call/call.go +++ b/cmd/gomu/cmd/cli/call/call.go @@ -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