portmapper: minor linting fix, and comment purpose of newProxy variable

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2020-09-23 17:34:55 +02:00
parent 4231dbca23
commit f6be7f2945
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -17,6 +17,7 @@ type mapping struct {
container net.Addr
}
// newProxy is used to mock out the proxy server in tests
var newProxy = newProxyCommand
var (
@ -214,7 +215,7 @@ func (pm *PortMapper) Unmap(host net.Addr) error {
return ErrUnknownBackendAddressType
}
//ReMapAll will re-apply all port mappings
// ReMapAll re-applies all port mappings
func (pm *PortMapper) ReMapAll() {
pm.lock.Lock()
defer pm.lock.Unlock()