-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathkod_gen.go
70 lines (57 loc) · 2.2 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
// Code generated by "kod generate". DO NOT EDIT.
//go:build !ignoreKodGen
package case5
import (
"context"
"github.com/go-kod/kod"
"github.com/go-kod/kod/interceptor"
"reflect"
)
// Full method names for components.
const ()
func init() {
kod.Register(&kod.Registration{
Name: "github.com/go-kod/kod/Main",
Interface: reflect.TypeOf((*kod.Main)(nil)).Elem(),
Impl: reflect.TypeOf(refStructImpl{}),
Refs: `⟦b915993d:KoDeDgE:github.com/go-kod/kod/Main→github.com/go-kod/kod/tests/case5/testRefStruct1⟧`,
LocalStubFn: nil,
})
kod.Register(&kod.Registration{
Name: "github.com/go-kod/kod/tests/case5/TestRefStruct1",
Interface: reflect.TypeOf((*TestRefStruct1)(nil)).Elem(),
Impl: reflect.TypeOf(testRefStruct1{}),
Refs: ``,
LocalStubFn: func(ctx context.Context, info *kod.LocalStubFnInfo) any {
return testRefStruct1_local_stub{
impl: info.Impl.(TestRefStruct1),
interceptor: info.Interceptor,
}
},
})
}
// CodeGen version check.
var _ kod.CodeGenLatestVersion = kod.CodeGenVersion[[0][1]struct{}](`
ERROR: You generated this file with 'kod generate' (codegen
version v0.1.0). The generated code is incompatible with the version of the
github.com/go-kod/kod module that you're using. The kod module
version can be found in your go.mod file or by running the following command.
go list -m github.com/go-kod/kod
We recommend updating the kod module and the 'kod generate' command by
running the following.
go get github.com/go-kod/kod@latest
go install github.com/go-kod/kod/cmd/kod@latest
Then, re-run 'kod generate' and re-build your code. If the problem persists,
please file an issue at https://github.com/go-kod/kod/issues.
`)
// kod.InstanceOf checks.
var _ kod.InstanceOf[kod.Main] = (*refStructImpl)(nil)
var _ kod.InstanceOf[TestRefStruct1] = (*testRefStruct1)(nil)
// Local stub implementations.
// testRefStruct1_local_stub is a local stub implementation of [TestRefStruct1].
type testRefStruct1_local_stub struct {
impl TestRefStruct1
interceptor interceptor.Interceptor
}
// Check that [testRefStruct1_local_stub] implements the [TestRefStruct1] interface.
var _ TestRefStruct1 = (*testRefStruct1_local_stub)(nil)