You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwhisk.apache.org by ni...@apache.org on 2022/05/24 07:36:53 UTC

[openwhisk-client-go] 01/01: Support array result

This is an automated email from the ASF dual-hosted git repository.

ningyougang pushed a commit to branch support-array-result
in repository https://gitbox.apache.org/repos/asf/openwhisk-client-go.git

commit 665ca9e75840e5debefe11f1726785ef4eeaa6ef
Author: ning.yougang <ni...@navercorp.com>
AuthorDate: Tue May 24 14:58:10 2022 +0800

    Support array result
---
 whisk/action.go     | 4 ++--
 whisk/activation.go | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/whisk/action.go b/whisk/action.go
index 5396568..3673236 100644
--- a/whisk/action.go
+++ b/whisk/action.go
@@ -287,8 +287,8 @@ func (s *ActionService) Delete(actionName string) (*http.Response, error) {
 	return resp, nil
 }
 
-func (s *ActionService) Invoke(actionName string, payload interface{}, blocking bool, result bool) (map[string]interface{}, *http.Response, error) {
-	var res map[string]interface{}
+func (s *ActionService) Invoke(actionName string, payload interface{}, blocking bool, result bool) (interface{}, *http.Response, error) {
+	var res interface{}
 
 	// Encode resource name as a path (with no query params) before inserting it into the URI
 	// This way any '?' chars in the name won't be treated as the beginning of the query params
diff --git a/whisk/activation.go b/whisk/activation.go
index fdbe40c..8579ffa 100644
--- a/whisk/activation.go
+++ b/whisk/activation.go
@@ -61,7 +61,7 @@ type Response struct {
 	Result     *Result `json:"result,omitempty"`
 }
 
-type Result map[string]interface{}
+type Result interface{}
 
 type ActivationListOptions struct {
 	Name  string `url:"name,omitempty"`