fn: apps commands improvements (#476)

* improve apps commands

* fix app and routes update config and headers unset

* add the command config set/unset back

* prevent extractEnvConfig to panic if not valid key=value

* add examples to readme.md

* fix fn routes
This commit is contained in:
Pedro Nasser
2017-01-30 17:23:34 -02:00
committed by Travis Reeder
parent 5609a76c19
commit c62e22f5fe
4 changed files with 349 additions and 298 deletions

View File

@@ -185,7 +185,9 @@ func extractEnvConfig(configs []string) map[string]string {
c := make(map[string]string)
for _, v := range configs {
kv := strings.SplitN(v, "=", 2)
c[kv[0]] = os.ExpandEnv(kv[1])
if len(kv) == 2 {
c[kv[0]] = os.ExpandEnv(kv[1])
}
}
return c
}