mdeuser commented on a change in pull request #2461: Get Action URL from CLI 
(Review)
URL: 
https://github.com/apache/incubator-openwhisk/pull/2461#discussion_r125998848
 
 

 ##########
 File path: tools/cli/go-whisk/whisk/shared.go
 ##########
 @@ -26,6 +26,21 @@ type KeyValue struct {
 
 type KeyValueArr []KeyValue
 
+func (keyValueArr KeyValueArr) GetValue(key string) (interface{}) {
+    var res interface{}
+
+    for i := 0; i < len(keyValueArr); i++ {
+        if keyValueArr[i].Key == key {
+            res = keyValueArr[i].Value
+            break;
+        }
+    }
+
+    Debug(DbgInfo, "Got value '%v' from '%v' for key '%s'\n", res, 
keyValueArr, key)
 
 Review comment:
   Not sure how this debug line will look in practice since `keyValueArr` is an 
array which may greatly separate the target key/value pair values
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to