-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
embedded.go
43 lines (33 loc) · 1020 Bytes
/
embedded.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
package singlefile
// EmbeddedCase1 model
type EmbeddedCase1 struct {
Empty
*ExportedEmbeddedPointerAfterInterface
}
// Empty interface
type Empty interface{}
// ExportedEmbeddedPointerAfterInterface model
type ExportedEmbeddedPointerAfterInterface struct{}
// ExportedEmbeddedPointerExportedMethod method
func (*ExportedEmbeddedPointerAfterInterface) ExportedEmbeddedPointerExportedMethod() string {
return "ExportedEmbeddedPointerExportedMethodResponse"
}
// EmbeddedCase2 model
type EmbeddedCase2 struct {
*unexportedEmbeddedPointer
}
type unexportedEmbeddedPointer struct{}
// UnexportedEmbeddedPointerExportedMethod method
func (*unexportedEmbeddedPointer) UnexportedEmbeddedPointerExportedMethod() string {
return "UnexportedEmbeddedPointerExportedMethodResponse"
}
// EmbeddedCase3 model
type EmbeddedCase3 struct {
unexportedEmbeddedInterface
}
type unexportedEmbeddedInterface interface {
nestedInterface
}
type nestedInterface interface {
UnexportedEmbeddedInterfaceExportedMethod() string
}