Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/vektra/mockery
/ functions
Functions
1,773 in github.com/vektra/mockery
⨍
Functions
1,773
◇
Types & classes
658
↓ 338 callers
Method
Get
()
internal/fixtures/generic.go:34
↓ 233 callers
Method
Lock
(<-chan struct{})
internal/fixtures/consul.go:4
↓ 233 callers
Method
Unlock
()
internal/fixtures/consul.go:5
↓ 170 callers
Method
Return
(v TKeep)
internal/fixtures/mocks_testify_test_test.go:2121
↓ 170 callers
Function
run
(ctx context.Context, confPathStr string, v3ConfPath string)
internal/cmd/migrate.go:130
↓ 103 callers
Method
Run
(run func(t1 TImport))
internal/fixtures/mocks_testify_test_test.go:2108
↓ 100 callers
Method
Error
()
internal/fixtures/custom_error.go:8
↓ 69 callers
Method
Return
(n int, err error)
internal/fixtures/mocks_io_test.go:92
↓ 41 callers
Method
Get
()
internal/fixtures/auto_generated_skip/foo.go:4
↓ 34 callers
Method
Run
(run func(p []byte))
internal/fixtures/mocks_io_test.go:79
↓ 30 callers
Method
Type
()
template/var.go:24
↓ 26 callers
Method
Append
(depType string, msg string)
internal/cmd/migrate.go:113
↓ 25 callers
Method
String
()
internal/fixtures/example_project/pkg_with_submodules/submodule/string.go:4
↓ 23 callers
Method
Get
(a)
internal/fixtures/iface_typed_param_lowercase/getter_iface_typed_param.go:4
↓ 22 callers
Method
Name
()
template/package.go:4
↓ 21 callers
Method
Sprintf
cases: normal argument + variadic argument, w/ and w/o interface type
internal/fixtures/requester_variadic.go:11
↓ 21 callers
Function
addr
(v T)
config/config.go:66
↓ 19 callers
Function
NewStackErr
(cause error)
internal/stackerr/stackerr.go:14
↓ 15 callers
Method
Path
()
template/package.go:5
↓ 13 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:1151
↓ 12 callers
Method
Return
(interfaceBMoqParam interfaceB)
internal/fixtures/method_args/same_name_arg_and_type/mocks_testify_same_name_arg_and_type_test.go:83
↓ 11 callers
Method
Close
Close provides a mock function for the type MockCloser
internal/fixtures/mocks_io_test.go:217
↓ 8 callers
Method
Qualifier
Qualifier returns the qualifier which must be used to refer to types declared in the package.
template/package.go:29
↓ 8 callers
Method
TypeString
TypeString returns the variable type with the package qualifier in the format 'pkg.Type'.
template/var.go:36
↓ 7 callers
Function
Exists
(name string)
internal/file/exists.go:9
↓ 7 callers
Method
FooFunc
(*Foo)
internal/fixtures/replace_type_pointers/interface.go:9
↓ 7 callers
Method
Get
(string)
internal/fixtures/example_project/pkg_with_subpkgs/subpkg2/subpkg3/foo.go:4
↓ 7 callers
Method
Run
(run func(interfaceB1 interfaceB))
internal/fixtures/method_args/same_name_arg_and_type/mocks_testify_same_name_arg_and_type_test.go:70
↓ 7 callers
Method
VariadicMany
VariadicMany provides a mock function for the type MockExpecter
internal/fixtures/mocks_testify_test_test.go:1371
↓ 7 callers
Function
deref
(t *T)
config/config.go:70
↓ 7 callers
Function
mergeConfigs
mergeConfigs merges the values from c1 into c2.
config/config.go:270
↓ 6 callers
Method
Execute
Execute generates and writes the Moq implementation for the given data.
template/template.go:31
↓ 6 callers
Method
Foo
(NilRun)
internal/fixtures/nil_run.go:4
↓ 6 callers
Method
GetString
(name string)
internal/cmd/init.go:31
↓ 6 callers
Method
Run
(e *zerolog.Event, level zerolog.Level, message string)
tools/cmd/root.go:17
↓ 6 callers
Method
Variadic
(ints ...int)
internal/fixtures/expecter.go:7
↓ 5 callers
Method
AddName
AddName records name as visible in the current scope. This method does not check for naming collisions, and consequently will not modify the given nam
template/method_scope.go:212
↓ 5 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:3279
↓ 5 callers
Method
Get
Get provides a mock function for the type MockRequester
internal/fixtures/mocks_testify_test_test.go:3284
↓ 5 callers
Function
GetLogger
(levelStr string)
internal/logging/logging.go:71
↓ 5 callers
Method
GetPackageConfig
(ctx context.Context, pkgPath string)
config/config.go:403
↓ 5 callers
Function
GetStack
(err error)
internal/stackerr/stackerr.go:39
↓ 5 callers
Method
Return
()
internal/fixtures/type_alias/mocks_testify_type_alias_test.go:225
↓ 5 callers
Method
Return
(v T3)
internal/fixtures/index_list_expr/mocks_testify_index_list_expr_test.go:89
↓ 5 callers
Method
Return
()
internal/fixtures/example_project/mocks_testify_example_project_test.go:126
↓ 5 callers
Method
Variadic
Variadic provides a mock function for the type MockExpecter
internal/fixtures/mocks_testify_test_test.go:1308
↓ 5 callers
Method
VariadicMany
(i int, a string, intfs ...interface{})
internal/fixtures/expecter.go:8
↓ 4 callers
Method
Bar
()
internal/fixtures/unexported/interface.go:4
↓ 4 callers
Method
Error
()
internal/stackerr/stackerr.go:27
↓ 4 callers
Function
FindInHierarchy
FindInHierarchy looks for a file with any of the names in the hierarchy up to the root folder. It returns the complete path of the file, the content a
internal/file/find.go:22
↓ 4 callers
Method
Get
(path string)
internal/fixtures/directive_comments/directive_comments.go:9
↓ 4 callers
Function
NewMockRequester
NewMockRequester creates a new instance of MockRequester. It also registers a testing interface on the mock and a cleanup function to assert the mocks
internal/fixtures/mocks_testify_test_test.go:3258
↓ 4 callers
Function
NewRegistry
New loads the source package info and returns a new instance of Registry.
template/registry.go:37
↓ 4 callers
Function
NewRootConfig
( ctx context.Context, flags *pflag.FlagSet, )
config/config.go:128
↓ 4 callers
Method
Return
(n int, err error)
internal/fixtures/mocks_net_http_test.go:138
↓ 4 callers
Method
Run
(run func(v Type, v1 S, s subpkg.S))
internal/fixtures/type_alias/mocks_testify_type_alias_test.go:202
↓ 4 callers
Method
Run
(run func(f rt1.RType1))
internal/fixtures/example_project/replace_type/mocks_testify_replace_type_test.go:59
↓ 4 callers
Method
Run
(run func())
internal/fixtures/empty_return/mocks_testify_empty_return_test.go:56
↓ 4 callers
Method
addImport
(ctx context.Context, pkg TypesPackage)
template/registry.go:112
↓ 4 callers
Method
argCallListSlice
(start, end int, ellipsis bool)
template/method.go:165
↓ 4 callers
Function
migrateConfig
( ctx context.Context, tbl *tableWriter, v2Config *V2Config, v3Config **config.Config, )
internal/cmd/migrate.go:286
↓ 3 callers
Method
AddVar
AddVar allocates a variable instance and adds it to the method scope. Variables names are generated if required and are ensured to be without conflic
template/method_scope.go:118
↓ 3 callers
Method
BarFunc
(Bar)
internal/fixtures/replace_type_pointers/interface.go:10
↓ 3 callers
Method
Create
(x interface{})
internal/fixtures/empty_interface.go:4
↓ 3 callers
Function
DocsURL
(relativePath string)
internal/logging/logging.go:58
↓ 3 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:5812
↓ 3 callers
Method
Foo
Foo provides a mock function for the type MockVariadicWithMultipleReturns
internal/fixtures/mocks_testify_test_test.go:5817
↓ 3 callers
Method
Func
(arg1 *T1, arg2 T2)
internal/fixtures/index_list_expr/index_list_expression.go:4
↓ 3 callers
Function
GetSemverInfo
()
internal/logging/logging.go:37
↓ 3 callers
Method
ManyArgsReturns
ManyArgsReturns provides a mock function for the type MockExpecter
internal/fixtures/mocks_testify_test_test.go:1156
↓ 3 callers
Method
Name
Name returns the name of the parameter.
template/param.go:16
↓ 3 callers
Function
NewCommentGroupFromAST
(comments *ast.CommentGroup)
template/comment_group.go:17
↓ 3 callers
Function
NewMockVariadicWithMultipleReturns
NewMockVariadicWithMultipleReturns creates a new instance of MockVariadicWithMultipleReturns. It also registers a testing interface on the mock and a
internal/fixtures/mocks_testify_test_test.go:5791
↓ 3 callers
Function
NewPackage
NewPackage creates a new instance of Package.
template/package.go:16
↓ 3 callers
Method
Return
(s string, err error)
internal/fixtures/directive_comments/mocks_testify_directive_comments_test.go:92
↓ 3 callers
Method
Return
()
internal/fixtures/iface_new_type/mocks_testify_iface_new_type_test.go:63
↓ 3 callers
Method
Return
()
internal/fixtures/example_project/replace_type/mocks_testify_replace_type_test.go:72
↓ 3 callers
Method
Return
(bar1 Bar)
internal/fixtures/replace_type_pointers/mocks_testify_replace_type_pointers_test.go:81
↓ 3 callers
Method
Run
(run func(arg1 *T1, arg2 T2))
internal/fixtures/index_list_expr/mocks_testify_index_list_expr_test.go:71
↓ 3 callers
Method
Run
(run func())
internal/fixtures/iface_new_type/mocks_testify_iface_new_type_test.go:56
↓ 3 callers
Method
Run
(run func(baz *foo.Baz))
internal/fixtures/example_project/mocks_testify_example_project_test.go:113
↓ 3 callers
Method
RunAndReturn
(run func(t1 TImport) TKeep)
internal/fixtures/mocks_testify_test_test.go:2126
↓ 3 callers
Method
SuggestName
SuggestName creates a new variable name in the lexical scope of the method. It ensures the returned name does not conflict with any other name visible
template/method_scope.go:66
↓ 3 callers
Method
TypeString
TypeString returns the string representation of the type of the parameter.
template/param.go:56
↓ 3 callers
Method
addImport
(ctx context.Context, pkg TypesPackage, imports map[string]*Package)
template/method_scope.go:222
↓ 3 callers
Function
addr
(v T)
internal/cmd/init.go:14
↓ 3 callers
Method
argList
(includeName bool)
template/method.go:96
↓ 3 callers
Method
buildTemplateData
( ctx context.Context, // ifaceFilePath is the absolute path of the original interface. ifaceFilePath strin
config/config.go:756
↓ 3 callers
Function
isPathOutsideCurrentGoModRepo
(workingDir string, targetPath string)
config/config.go:828
↓ 3 callers
Function
newMockinterfaceA
newMockinterfaceA creates a new instance of mockinterfaceA. It also registers a testing interface on the mock and a cleanup function to assert the moc
internal/fixtures/method_args/same_name_arg_and_type/mocks_testify_same_name_arg_and_type_test.go:15
↓ 3 callers
Function
printStack
(err error)
tools/cmd/root.go:61
↓ 3 callers
Function
ptr
(s T)
config/config_test.go:199
↓ 3 callers
Method
returnArgList
(includeNames bool)
template/method.go:203
↓ 2 callers
Method
AddImport
addImport adds the given package to the set of imports. It generates a suitable alias if there are any conflicts with previously imported packages. pk
template/registry.go:98
↓ 2 callers
Method
Bar
()
internal/fixtures/interface_dir_relative/interface.go:4
↓ 2 callers
Method
Bar
Bar provides a mock function for the type MockFoo
internal/fixtures/interface_dir_relative/mocks/fixtures/interface_dir_relative/mocks.go:41
↓ 2 callers
Function
CleanPath
(filePath string)
internal/file/find.go:12
↓ 2 callers
Method
ConfigFileUsed
()
config/config.go:247
↓ 2 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:5706
↓ 2 callers
Method
EXPECT
()
internal/fixtures/empty_return/mocks_testify_empty_return_test.go:36
next →
1–100 of 1,773, ranked by callers