You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by gi...@git.apache.org on 2017/10/10 22:35:15 UTC

[GitHub] alexkli opened a new pull request #2848: Support reading param.json from stdin #2837

alexkli opened a new pull request #2848: Support reading param.json from stdin #2837
URL: https://github.com/apache/incubator-openwhisk/pull/2848
 
 
   For #2837. Adds support for `-P -` that reads the param json file from the stdin, as a common practice in *nix tools.
   
   Disclaimer: My first shot at programming in go. Thus I blindly cargo-cult copied from the existing code base :)
   
   I deliberately added the feature _only_ for `-P / --param-file`. Initially I tried to do it generically inside `readFile()` from `util.go`, but it seems it's not a good idea to enable this for all callers of `readFile()`, which apparently [include configuration files](https://github.com/apache/incubator-openwhisk/blob/26146368f1dd07f817062e662db64c73a8d486d6/tools/cli/go-whisk-cli/commands/api.go#L844) (i.e. file name is not passed as argument on the command line).
   
   Example usage after the change:
   
       cat params.json | envsubst | wsk -i action invoke myaction -P -
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services