golint: Fix issues in pkg/nat
Updates #14756 Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
parent
e6e9fbe4f7
commit
3c362c6d56
4 changed files with 42 additions and 29 deletions
|
@ -59,10 +59,10 @@ func TestSortPortMap(t *testing.T) {
|
|||
},
|
||||
Port("6379/tcp"): []PortBinding{
|
||||
{},
|
||||
{HostIp: "0.0.0.0", HostPort: "32749"},
|
||||
{HostIP: "0.0.0.0", HostPort: "32749"},
|
||||
},
|
||||
Port("9999/tcp"): []PortBinding{
|
||||
{HostIp: "0.0.0.0", HostPort: "40000"},
|
||||
{HostIP: "0.0.0.0", HostPort: "40000"},
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -77,7 +77,7 @@ func TestSortPortMap(t *testing.T) {
|
|||
t.Errorf("failed to prioritize port with explicit mappings, got %v", ports)
|
||||
}
|
||||
if pm := portMap[Port("6379/tcp")]; !reflect.DeepEqual(pm, []PortBinding{
|
||||
{HostIp: "0.0.0.0", HostPort: "32749"},
|
||||
{HostIP: "0.0.0.0", HostPort: "32749"},
|
||||
{},
|
||||
}) {
|
||||
t.Errorf("failed to prioritize bindings with explicit mappings, got %v", pm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue