...
1
2
3
4
5 package p
6
7 import (
8 "context"
9 "database/sql"
10 )
11
12 type I interface {
13 m(int, int, *int, int)
14 }
15
16 type T struct{}
17
18 func (_ *T) m(a, b, c, d int) {}
19
20 var _ I = new (T)
21
22
23
24 type Result struct {
25 Value string
26 }
27
28 type Executor interface {
29 Execute(context.Context, sql.Stmt, int, []sql.NamedArg, int) (Result, error)
30 }
31
32 type myExecutor struct{}
33
34 func (_ *myExecutor) Execute(ctx context.Context, stmt sql.Stmt, maxrows int, args []sql.NamedArg, urgency int) (*Result, error) {
35 return &Result{}, nil
36 }
37
38 var ex Executor = new (myExecutor)
39
View as plain text