golint: Fix issues in pkg/nat

Updates #14756

Signed-off-by: Dave Tucker <dt@docker.com>
This commit is contained in:
Dave Tucker 2015-07-21 14:43:32 +01:00
parent e6e9fbe4f7
commit 3c362c6d56
4 changed files with 42 additions and 29 deletions

View file

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