2
0

Add more tests for pgtype.Bool

This commit is contained in:
Jack Christensen
2017-03-03 17:15:05 -06:00
parent 0a0c086edd
commit 2e2b11be34
2 changed files with 58 additions and 6 deletions
+1 -4
View File
@@ -50,10 +50,7 @@ func (b *Bool) AssignTo(dst interface{}) error {
// if dst is a pointer to pointer, strip the pointer and try again
case reflect.Ptr:
if b.Status == Null {
if !el.IsNil() {
// if the destination pointer is not nil, nil it out
el.Set(reflect.Zero(el.Type()))
}
el.Set(reflect.Zero(el.Type()))
return nil
}
if el.IsNil() {