Closed blackjune closed 4 years ago
@blackjune do you mind explaining your issue? From what I can see the error is being returned. The loop on response.go#L77 looks fine to me.
for _, d := range dataI.([]interface{}) {
if dataPart, err = jsonMarshalData(d); err != nil {
return nil, err // L78: being returned
}
data = append(data, dataPart)
}
when d is an error, d will be lost. when jsonMarshalData returns an error, where will be a memory leak
Hmmm... I see.
Do you mind making a pull request with those changes?
https://github.com/northwesternmutual/grammes/blob/master/response.go#L78