go-pmtiles
go-pmtiles copied to clipboard
Nil pointer check
In line 188 of bucket.go, resp could be nil if the baseURL is nonsensical. Would be better if the dial tcp lookup : no such host error is propagated so that the user can correct the input.
resp, err := b.client.Do(req)
if err != nil {
if resp != nil {
return nil, "", resp.StatusCode, err
} else {
return nil, "", http.StatusBadGateway, err
}
}
Please let me know if a pull request would be merged.
Can you please open a PR?
return nil, "", http.StatusBadGateway, err
we need to return an integer for the 3rd arg, maybe just 0?