-
Notifications
You must be signed in to change notification settings - Fork 86
/
kod_gen.go
49 lines (40 loc) · 1.11 KB
/
kod_gen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Code generated by "kod generate". DO NOT EDIT.
//go:build !ignoreKodGen
package main
import (
"context"
"github.com/go-kod/kod"
"github.com/go-kod/kod/interceptor"
"reflect"
)
func init() {
kod.Register(&kod.Registration{
Name: "github.com/go-kod/kod/Main",
Interface: reflect.TypeOf((*kod.Main)(nil)).Elem(),
Impl: reflect.TypeOf(app{}),
Refs: ``,
LocalStubFn: func(ctx context.Context, info *kod.LocalStubFnInfo) any {
interceptors := info.Interceptors
if h, ok := info.Impl.(interface {
Interceptors() []interceptor.Interceptor
}); ok {
interceptors = append(interceptors, h.Interceptors()...)
}
return main_local_stub{
impl: info.Impl.(kod.Main),
interceptor: interceptor.Chain(interceptors),
name: info.Name,
}
},
})
}
// kod.InstanceOf checks.
var _ kod.InstanceOf[kod.Main] = (*app)(nil)
// Local stub implementations.
type main_local_stub struct {
impl kod.Main
name string
interceptor interceptor.Interceptor
}
// Check that main_local_stub implements the kod.Main interface.
var _ kod.Main = (*main_local_stub)(nil)