Repository navigation
Conversation
| return errors.New("destination not a pointer") | ||
| } | ||
| rv := reflect.ValueOf(dest) | ||
| if rv.Kind() == reflect.Pointer && rv.IsNil() { |
There was a problem hiding this comment.
This changes the existing database/sql behavior for typed-nil sql.Scanner values: their Scan method used to be called and could handle a nil receiver, but this check rejects them before that call. Is this intentional, or should we preserve the previous behavior? A test would help make the intended behavior explicit.
| select { | ||
| case <-called: | ||
| case err := <-called: | ||
| require.ErrorIs(t, err, net.ErrClosed) |
There was a problem hiding this comment.
This branch means the handler was called more than once, which is already a test failure regardless of the error. Why do we expect net.ErrClosed here when the test only passes firstErr and secondErr? Seems we can include err in t.Fatalf instead, so the failure reports the unexpected extra call rather than an unrelated error mismatch. The same applies to the early-return checks in manager_internal_test.go, compression_close_test.go, and client_compression_test.go.
No description provided.