ningyougang commented on code in PR #170:
URL:
https://github.com/apache/openwhisk-runtime-go/pull/170#discussion_r937252815
##########
common/gobuild.py.launcher.go:
##########
@@ -89,12 +91,29 @@ func main() {
}
}
// get payload if not empty
- var payload map[string]interface{}
+ isJsonObjectParam := true
+ var payloadForJsonObject map[string]interface{}
+ var payloadForJsonArray []interface{}
if value, ok := input["value"].(map[string]interface{}); ok {
- payload = value
+ payloadForJsonObject = value
+ } else {
+ if value, ok := input["value"].([]interface{}); ok {
+ payloadForJsonArray = value
+ isJsonObjectParam = false
+ }
}
// process the request
- result := action(payload)
+ var result interface{}
+ funcMain := reflect.ValueOf(Main)
Review Comment:
It is the user's action's Main. i debugged the /init(or /run) before, when
execute `/init`, it will inject user action codes to action container's
suitable directory, the common/gobuild.py.launcher.go can recognize this Main
method.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]