File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -2032,14 +2032,7 @@ func (w *sqlScannerWrapper) Scan(src any) error {
20322032 return w .m .Scan (t .OID , TextFormatCode , bufSrc , w .v )
20332033}
20342034
2035- // valuerReflectType is a reflect.Type for driver.Valuer. It has confusing syntax because reflect.TypeOf returns nil
2036- // when it's argument is a nil interface value. So we use a pointer to the interface and call Elem to get the actual
2037- // type. Yuck.
2038- //
2039- // This can be simplified in Go 1.22 with reflect.TypeFor.
2040- //
2041- // var valuerReflectType = reflect.TypeFor[driver.Valuer]()
2042- var valuerReflectType = reflect .TypeOf ((* driver .Valuer )(nil )).Elem ()
2035+ var valuerReflectType = reflect .TypeFor [driver.Valuer ]()
20432036
20442037// isNilDriverValuer returns true if value is any type of nil unless it implements driver.Valuer. *T is not considered to implement
20452038// driver.Valuer if it is only implemented by T.
You can’t perform that action at this time.
0 commit comments