You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Check if the response status is OKifresp.StatusCode!=http.StatusOK {
returnnil, fmt.Errorf("vespa query failed with status %d", resp.StatusCode)
}
// Read the response bodydataBytes, err:=io.ReadAll(resp.Body)
iferr!=nil {
returnnil, err
}
vardatamap[string]interface{}
err=json.Unmarshal(dataBytes, &data)
iferr!=nil {
panic(err)
}
root:=data["root"].(map[string]interface{})
children:=root["children"].([]interface{}) // <- This has thrown exceptions for me
If the response does not conform to the expert assertions, it will panic.
The text was updated successfully, but these errors were encountered:
Hi! Type assertions are not fully handled in NilAway right now, which is why you're seeing the false negative here. I'm keeping this issue open to track the efforts :)
First of all I love this library and think it is a great addition to the Golang community, thank you for your hard work for it.
I got a nil pointer exception, but did not see a nilaway error when checking the code:
Full code for context:
If the response does not conform to the expert assertions, it will panic.
The text was updated successfully, but these errors were encountered: