linuxkit: print response status, not the response object when validating a URL

go_vet (via https://goreportcard.com/report/github.com/linuxkit/linuxkit)
reported:

    error: arg resp for printf verb %s of wrong type: *net/http.Response (vet)

Signed-off-by: Ian Campbell <ijc@docker.com>
This commit is contained in:
Ian Campbell 2018-01-15 17:05:39 +00:00
parent 190a87557f
commit 6483a2e6dc

View File

@ -291,7 +291,7 @@ func validateHTTPURL(url string) error {
return err
}
if resp.StatusCode >= 400 {
return fmt.Errorf("Got a non 200- or 300- HTTP response code: %s", resp)
return fmt.Errorf("Got a non 200- or 300- HTTP response code: %s", resp.Status)
}
return nil
}