@@ -100,13 +100,13 @@ func preUpdateHookTrampoline(handle unsafe.Pointer, dbHandle uintptr, op int, db
100
100
// Use handles to avoid passing Go pointers to C.
101
101
type handleVal struct {
102
102
db * SQLiteConn
103
- val interface {}
103
+ val any
104
104
}
105
105
106
106
var handleLock sync.Mutex
107
107
var handleVals = make (map [unsafe.Pointer ]handleVal )
108
108
109
- func newHandle (db * SQLiteConn , v interface {} ) unsafe.Pointer {
109
+ func newHandle (db * SQLiteConn , v any ) unsafe.Pointer {
110
110
handleLock .Lock ()
111
111
defer handleLock .Unlock ()
112
112
val := handleVal {db : db , val : v }
@@ -124,7 +124,7 @@ func lookupHandleVal(handle unsafe.Pointer) handleVal {
124
124
return handleVals [handle ]
125
125
}
126
126
127
- func lookupHandle (handle unsafe.Pointer ) interface {} {
127
+ func lookupHandle (handle unsafe.Pointer ) any {
128
128
return lookupHandleVal (handle ).val
129
129
}
130
130
@@ -238,7 +238,7 @@ func callbackArg(typ reflect.Type) (callbackArgConverter, error) {
238
238
switch typ .Kind () {
239
239
case reflect .Interface :
240
240
if typ .NumMethod () != 0 {
241
- return nil , errors .New ("the only supported interface type is interface{} " )
241
+ return nil , errors .New ("the only supported interface type is any " )
242
242
}
243
243
return callbackArgGeneric , nil
244
244
case reflect .Slice :
@@ -360,11 +360,11 @@ func callbackRetGeneric(ctx *C.sqlite3_context, v reflect.Value) error {
360
360
}
361
361
362
362
cb , err := callbackRet (v .Elem ().Type ())
363
- if err != nil {
364
- return err
365
- }
363
+ if err != nil {
364
+ return err
365
+ }
366
366
367
- return cb (ctx , v .Elem ())
367
+ return cb (ctx , v .Elem ())
368
368
}
369
369
370
370
func callbackRet (typ reflect.Type ) (callbackRetConverter , error ) {
0 commit comments