Sfoglia il codice sorgente

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

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 4 anni fa
parent
commit
f6be7f2945
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      libnetwork/portmapper/mapper.go

+ 2 - 1
libnetwork/portmapper/mapper.go

@@ -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()