chore: fix potential nil pointer errors (#3454)

This commit is contained in:
Kevin Wan
2023-07-30 21:37:41 +08:00
committed by GitHub
parent ad4cce959d
commit c3f57e9b0a
7 changed files with 40 additions and 11 deletions

View File

@@ -146,7 +146,7 @@ func unmarshalRow(v any, scanner rowsScanner, strict bool) error {
}
rv := reflect.ValueOf(v)
if err := mapping.ValidatePtr(&rv); err != nil {
if err := mapping.ValidatePtr(rv); err != nil {
return err
}
@@ -182,7 +182,7 @@ func unmarshalRow(v any, scanner rowsScanner, strict bool) error {
func unmarshalRows(v any, scanner rowsScanner, strict bool) error {
rv := reflect.ValueOf(v)
if err := mapping.ValidatePtr(&rv); err != nil {
if err := mapping.ValidatePtr(rv); err != nil {
return err
}