fix: correct issue with nil map

This commit is contained in:
Jose Diaz-Gonzalez committed 2020-02-25 20:11:32 -05:00
1 parent 2a5fcd001e
commit 6ecf6c31ba
1 file changed
+2 -2
+2 -2
View File
@@ -141,7 +141,7 @@ func setProxyPorts(appName string, proxyPortMap []PortMap) error {
} }
func removeProxyPorts(appName string, proxyPortMap []PortMap) error { func removeProxyPorts(appName string, proxyPortMap []PortMap) error {
var toRemove map[string]bool toRemove := map[string]bool{}
for _, portMap := range proxyPortMap { for _, portMap := range proxyPortMap {
toRemove[portMap.String()] = true toRemove[portMap.String()] = true
@@ -197,7 +197,7 @@ func parseProxyPortMapString(stringPortMap string) []PortMap {
func uniqueProxyPortMap(proxyPortMap []PortMap) []PortMap { func uniqueProxyPortMap(proxyPortMap []PortMap) []PortMap {
var unique []PortMap var unique []PortMap
var existingPortMaps map[string]bool existingPortMaps := map[string]bool{}
for _, portMap := range proxyPortMap { for _, portMap := range proxyPortMap {
if existingPortMaps[portMap.String()] { if existingPortMaps[portMap.String()] {