mirror of
https://github.com/containrrr/watchtower.git
synced 2025-12-14 14:10:12 +01:00
Refactor port mapping functions for build simplicity
This commit is contained in:
parent
e75236414e
commit
6a56597d45
3 changed files with 7 additions and 13 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package container
|
||||
|
||||
import (
|
||||
"github.com/docker/go-connections/nat"
|
||||
)
|
||||
|
||||
func sliceEqual(s1, s2 []string) bool {
|
||||
|
|
@ -67,14 +66,3 @@ func structMapSubtract(m1, m2 map[string]struct{}) map[string]struct{} {
|
|||
return m
|
||||
}
|
||||
|
||||
func structMapPortSubtract(m1, m2 map[nat.Port]struct{}) map[nat.Port]struct{} {
|
||||
m := map[nat.Port]struct{}{}
|
||||
|
||||
for k1, v1 := range m1 {
|
||||
if _, ok := m2[k1]; !ok {
|
||||
m[k1] = v1
|
||||
}
|
||||
}
|
||||
|
||||
return m
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue