MCPcopy
hub / github.com/uber-go/mock / Index

Interface Index

sample/user.go:37–83  ·  view source on GitHub ↗

calls itself "imp_four" A bizarre interface to test corner cases in mockgen. This would normally be in its own file or package, separate from the user of it (e.g. io.Reader).

Source from the content-addressed store, hash-verified

35// This would normally be in its own file or package,
36// separate from the user of it (e.g. io.Reader).
37type Index interface {
38 Get(key string) any
39 GetTwo(key1, key2 string) (v1, v2 any)
40 Put(key string, value any)
41
42 // Check that imports are handled correctly.
43 Summary(buf *btz.Buffer, w io.Writer)
44 Other() hash.Hash
45 Templates(a t1.CSS, b t2.FuncMap)
46
47 // A method with an anonymous argument.
48 Anon(string)
49
50 // Methods using foreign types outside the standard library.
51 ForeignOne(imp1.Imp1)
52 ForeignTwo(renamed2.Imp2)
53 ForeignThree(Imp3)
54 ForeignFour(imp_four.Imp4)
55
56 // A method that returns a nillable type.
57 NillableRet() error
58 // A method that returns a non-interface type.
59 ConcreteRet() chan<- bool
60
61 // Methods with an ellipsis argument.
62 Ellip(fmt string, args ...any)
63 EllipOnly(...string)
64
65 // A method with a pointer argument that we will set.
66 Ptr(arg *int)
67
68 // A method with a slice argument and an array return.
69 Slice(a []int, b []byte) [3]int
70
71 // A method with channel arguments.
72 Chan(a chan int, b chan<- hash.Hash)
73
74 // A method with a function argument.
75 Func(f func(http.Request) (int, bool))
76
77 // A method with a map argument.
78 Map(a map[int]hash.Hash)
79
80 // Methods with an unnamed empty struct argument.
81 Struct(a struct{}) // not so likely
82 StructChan(a chan struct{}) // a bit more common
83}
84
85// An interface with an embedded interface.
86type Embed interface {

Callers 16

parseMethodMethod · 0.65
TestRememberFunction · 0.65
RememberFunction · 0.65
TestRememberFunction · 0.65
RememberFunction · 0.65
TestRememberFunction · 0.65
TestRememberFunction · 0.65
TestVariadicFunctionFunction · 0.65
RememberFunction · 0.65
TestRememberFunction · 0.65
RememberFunction · 0.65

Implementers 2

MockIndexsample/mock_user_test.go
MockIndexMockRecordersample/mock_user_test.go

Calls

no outgoing calls

Tested by

no test coverage detected