issues
search
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
change second part of WatchdogConfig.Process's response to nil rather than an empty slice.
change the logic of mapEnv and ignore empty value environment
Motivation and Context
original Process will return a 0 length empty slice, By changing that into a nil will prevent unnecessary alloc.
empty value environment is useless for building a config.
How Has This Been Tested?
go test -run Test_mapEnv
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly.
[x] I've read the
CONTRIBUTION
guide
[x] I have signed-off my commits with
git commit -s
[x] I have added tests to cover my changes.
[ ] All new and existing tests passed.
jonyhy96
commented
4 years ago
/cc @alexellis
Description
Motivation and Context
How Has This Been Tested?
go test -run Test_mapEnv
Types of changes
Checklist:
git commit -s