1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Remove used param on ParseHost

The first param on opts.ParseHost() wasn't being used for anything.

Once we get rid of that param we can then also clean-up some code
that calls ParseHost() because the param that was passed in wasn't
being used for anything else.

Signed-off-by: Doug Davis <dug@us.ibm.com>
This commit is contained in:
Doug Davis 2015-10-11 20:45:17 -07:00
parent c45ad0b02d
commit ba973f2d74
4 changed files with 6 additions and 13 deletions

View file

@ -458,12 +458,12 @@ func TestParseHost(t *testing.T) {
}
for value, errorMessage := range invalid {
if _, err := ParseHost(defaultHTTPHost, value); err == nil || err.Error() != errorMessage {
if _, err := ParseHost(value); err == nil || err.Error() != errorMessage {
t.Fatalf("Expected an error for %v with [%v], got [%v]", value, errorMessage, err)
}
}
for value, expected := range valid {
if actual, err := ParseHost(defaultHTTPHost, value); err != nil || actual != expected {
if actual, err := ParseHost(value); err != nil || actual != expected {
t.Fatalf("Expected for %v [%v], got [%v, %v]", value, expected, actual, err)
}
}