This commit is contained in:
Marin Bek 2014-11-11 15:39:36 +01:00
parent ebf3324c90
commit fd03304d0b

16
goes.go
View File

@ -345,14 +345,14 @@ func (req *Request) Run() (Response, error) {
} }
esResp := new(Response) esResp := new(Response)
if req.method == "HEAD" { if req.method == "HEAD" {
esResp.Status = uint64(resp.StatusCode) esResp.Status = uint64(resp.StatusCode)
} else { } else {
err = json.Unmarshal(body, &esResp) err = json.Unmarshal(body, &esResp)
if err != nil { if err != nil {
return Response{}, err return Response{}, err
} }
} }
if req.api == "_bulk" && esResp.Errors { if req.api == "_bulk" && esResp.Errors {
for _, item := range esResp.Items { for _, item := range esResp.Items {