Disable envAsHeader by default (#435)

* disable envAsHeader by default

* fix -e flag usage description
This commit is contained in:
Pedro Nasser
2016-12-13 23:55:32 -02:00
committed by GitHub
parent 55e031512b
commit ea93ba00ac
2 changed files with 4 additions and 2 deletions

View File

@@ -237,7 +237,9 @@ func callfn(u string, content io.Reader, output io.Writer, env []string) error {
req.Header.Set("Content-Type", "application/json") req.Header.Set("Content-Type", "application/json")
envAsHeader(req, env) if len(env) > 0 {
envAsHeader(req, env)
}
resp, err := http.DefaultClient.Do(req) resp, err := http.DefaultClient.Do(req)
if err != nil { if err != nil {

View File

@@ -29,7 +29,7 @@ func runflags() []cli.Flag {
return []cli.Flag{ return []cli.Flag{
cli.StringSliceFlag{ cli.StringSliceFlag{
Name: "e", Name: "e",
Usage: "limit the environment variables sent to function, if ommited then all are sent.", Usage: "select environment variables to be sent to function",
}, },
} }
} }