openfaas / of-watchdog

Reverse proxy for STDIO and HTTP microservices
MIT License
259 stars 115 forks source link

Fix some logic of config #96

Open jonyhy96 opened 4 years ago

jonyhy96 commented 4 years ago

Description

  1. change second part of WatchdogConfig.Process's response to nil rather than an empty slice.
  2. change the logic of mapEnv and ignore empty value environment

Motivation and Context

  1. original Process will return a 0 length empty slice, By changing that into a nil will prevent unnecessary alloc.
  2. empty value environment is useless for building a config.

How Has This Been Tested?

go test -run Test_mapEnv

Types of changes

Checklist:

jonyhy96 commented 4 years ago

/cc @alexellis