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
↓ 2 callers
Function
ExtractDirectiveConfig
ExtractDirectiveConfig parses interface's documentation from a declaration node and extracts mockery's directive configuration. Mockery directives ar
config/config.go:863
↓ 2 callers
Method
FilePath
()
config/config.go:666
↓ 2 callers
Method
Foo
Foo provides a mock function for the type MockVariadicWithMultipleReturnsUnrollVariadic
internal/fixtures/mocks_testify_test_test.go:5711
↓ 2 callers
Method
GetReplacement
(pkgPath string, typeName string)
config/config.go:849
↓ 2 callers
Method
Initialize
(ctx context.Context)
config/config.go:323
↓ 2 callers
Method
MethodScope
MethodScope returns a new MethodScope.
template/registry.go:78
↓ 2 callers
Function
New
New returns a new instance of Template.
template/template.go:20
↓ 2 callers
Function
NewDefaultKoanf
(ctx context.Context)
config/config.go:78
↓ 2 callers
Function
NewInterface
( name string, typeSpec *ast.TypeSpec, genDecl *ast.GenDecl, filepath string, fileSyntax *ast.File, pkg
internal/interface.go:20
↓ 2 callers
Function
NewInterfaceConfig
()
config/config.go:567
↓ 2 callers
Function
NewMockVariadicWithMultipleReturnsUnrollVariadic
NewMockVariadicWithMultipleReturnsUnrollVariadic creates a new instance of MockVariadicWithMultipleReturnsUnrollVariadic. It also registers a testing
internal/fixtures/mocks_testify_test_test.go:5685
↓ 2 callers
Function
NewPackageConfig
()
config/config.go:426
↓ 2 callers
Function
NewStackErrf
(cause error, f string, args ...any)
internal/stackerr/stackerr.go:21
↓ 2 callers
Method
NoArg
NoArg provides a mock function for the type MockExpecter
internal/fixtures/mocks_testify_test_test.go:1224
↓ 2 callers
Method
NoArgs
()
internal/fixtures/empty_return/interface.go:4
↓ 2 callers
Method
NoReturn
NoReturn provides a mock function for the type MockExpecter
internal/fixtures/mocks_testify_test_test.go:1268
↓ 2 callers
Method
Path
Path is the full package import path (without vendor).
template/package.go:42
↓ 2 callers
Method
Return
(bazMoqParam baz)
mocks_testify_main_test.go:74
↓ 2 callers
Method
Return
(n int)
github.com/LandonTClipp/example-go-repo/mocks_testify_foo_test.go:81
↓ 2 callers
Method
Return
(s string, err error)
internal/cmd/mocks_testify_cmd_test.go:90
↓ 2 callers
Method
Return
(s string)
internal/fixtures/multi_template/mocks_testify_multitemplate_test.go:74
↓ 2 callers
Method
Return
(v T)
internal/fixtures/iface_typed_param/mocks_testify_iface_typed_param_test.go:78
↓ 2 callers
Method
Return
(s string)
internal/fixtures/include_auto_generated/mocks_testify_includeautogenerated_test.go:74
↓ 2 callers
Method
Return
(s string)
internal/fixtures/interface_dir_relative/mocks/fixtures/interface_dir_relative/mocks.go:74
↓ 2 callers
Method
Return
(v1 a)
internal/fixtures/iface_typed_param_lowercase/mocks_testify_iface_typed_param_lowercase_test.go:83
↓ 2 callers
Method
Run
(e *zerolog.Event, level zerolog.Level, msg string)
internal/logging/logging.go:67
↓ 2 callers
Method
Run
()
internal/cmd/mockery.go:193
↓ 2 callers
Method
Run
(run func(bytes []byte))
internal/fixtures/mocks_net_http_test.go:125
↓ 2 callers
Method
Run
(run func(path string, handler http.Handler))
internal/fixtures/directive_comments/server_with_different_file.go:60
↓ 2 callers
Method
Run
(run func(path string))
internal/fixtures/directive_comments/mocks_testify_directive_comments_test.go:79
↓ 2 callers
Method
RunAndReturn
(run func())
internal/fixtures/empty_return/mocks_testify_empty_return_test.go:68
↓ 2 callers
Method
Stack
()
internal/stackerr/stackerr.go:35
↓ 2 callers
Method
TypeStringEllipsis
TypeStringEllipsis returns the string representation of the type of the parameter. If it is a variadic parameter, it will be represented as a variadic
template/param.go:64
↓ 2 callers
Method
VerifyJSONSchema
VerifyJSONSchema verifies that the contents of the type adhere to the schema defined by the schema argument. This method is not meant to be used dire
template/template_data.go:20
↓ 2 callers
Method
WithArgs
(a int, b string)
internal/fixtures/empty_return/interface.go:5
↓ 2 callers
Function
deCapitalise
(s string)
template/var.go:168
↓ 2 callers
Function
download
(ctx context.Context, url string)
internal/remote_template.go:37
↓ 2 callers
Function
findPkgPath
findPkgPath returns the fully-qualified go import path of a given dir. The dir must be relative to a go.mod file. In the case it isn't, an error is re
internal/template_generator.go:59
↓ 2 callers
Function
getFixturePath
getFixturePath returns an absolute path to a fixture sub-directory or file. getFixturePath("src.go") returns "/path/to/pkg/fixtures/src.go" getFixtur
internal/mockery_test.go:26
↓ 2 callers
Function
getMinorSemver
(semver string)
internal/logging/logging.go:48
↓ 2 callers
Function
getTypePath
(t types.Type)
internal/template_generator.go:192
↓ 2 callers
Function
initRun
(args []string, params argGetter)
internal/cmd/init.go:34
↓ 2 callers
Function
isConstraintIdent
(id *ast.Ident, pkgs []*packages.Package)
internal/parse.go:214
↓ 2 callers
Function
isConstraintInterface
(iface *types.Interface)
internal/parse.go:226
↓ 2 callers
Function
isConstraintSelector
(sel *ast.SelectorExpr, pkgs []*packages.Package)
internal/parse.go:202
↓ 2 callers
Function
logFatalErr
(ctx context.Context, err error)
internal/cmd/mockery.go:63
↓ 2 callers
Method
methodArg
(includeNames bool)
template/param.go:20
↓ 2 callers
Function
newMockinterfaceB0
newMockinterfaceB0 creates a new instance of mockinterfaceB0. It also registers a testing interface on the mock and a cleanup function to assert the m
internal/fixtures/method_args/same_name_arg_and_type/mocks_testify_same_name_arg_and_type_test.go:272
↓ 2 callers
Method
populateImportNamedType
( ctx context.Context, t interface { Obj() *types.TypeName TypeArgs() *types.TypeList }, imports map[s
template/method_scope.go:228
↓ 2 callers
Method
populateImportsHelper
populateImportsHelper extracts all the package imports for a given type recursively. The imported packages by a single type can be more than one (ex:
template/method_scope.go:261
↓ 2 callers
Method
signature
(includeNames bool)
template/method.go:53
↓ 2 callers
Function
toPtr
(i int)
internal/fixtures/iface_typed_param_lowercase/main_test.go:30
↓ 1 callers
Method
Append
(ctx context.Context, iface *internal.Interface)
internal/cmd/mockery.go:144
↓ 1 callers
Method
ArgCallList
ArgCallList is the string representation of method call parameters, ex: 's, n, foo'. In case of a last variadic parameter, it will be of the format 's
template/method.go:143
↓ 1 callers
Method
Bar
Bar provides a mock function for the type MockFoo
github.com/LandonTClipp/example-go-repo/mocks_testify_foo_test.go:41
↓ 1 callers
Method
Bar
Bar calls BarFunc.
internal/fixtures/multi_template/mocks_matryer_multitemplate_test.go:46
↓ 1 callers
Method
Bar
Bar provides a mock function for the type MockTestifyFoo
internal/fixtures/multi_template/mocks_testify_multitemplate_test.go:41
↓ 1 callers
Method
Bar
Bar provides a mock function for the type MockFoo
internal/fixtures/include_auto_generated/mocks_testify_includeautogenerated_test.go:41
↓ 1 callers
Method
CallName
CallName returns the string representation of the parameter to be used for a method call. For a variadic paramter, it will be of the format 'foos...'
template/param.go:47
↓ 1 callers
Method
DoB
SomeMethod - contains args with the same names of the type and arg
internal/fixtures/method_args/same_name_arg_and_type/entity.go:6
↓ 1 callers
Method
DoB0
(interfaceB interfaceB0)
internal/fixtures/method_args/same_name_arg_and_type/entity.go:7
↓ 1 callers
Method
DoB0v2
(interfaceB0 interfaceB0)
internal/fixtures/method_args/same_name_arg_and_type/entity.go:8
↓ 1 callers
Method
DoSomething
DoSomething provides a mock function for the type MockPanicOnNoReturnValue
internal/fixtures/mocks_testify_test_test.go:3213
↓ 1 callers
Method
DoSomething
()
internal/fixtures/panic_err.go:4
↓ 1 callers
Method
EXPECT
()
mocks_testify_main_test.go:36
↓ 1 callers
Method
EXPECT
()
github.com/LandonTClipp/example-go-repo/mocks_testify_foo_test.go:36
↓ 1 callers
Method
EXPECT
()
internal/cmd/mocks_testify_cmd_test.go:36
↓ 1 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:2850
↓ 1 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:3141
↓ 1 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:3208
↓ 1 callers
Method
EXPECT
()
internal/fixtures/mocks_testify_test_test.go:5626
↓ 1 callers
Method
EXPECT
()
internal/fixtures/type_alias/mocks_testify_type_alias_test.go:37
↓ 1 callers
Method
EXPECT
()
internal/fixtures/multi_template/mocks_testify_multitemplate_test.go:36
↓ 1 callers
Method
EXPECT
()
internal/fixtures/index_list_expr/mocks_testify_index_list_expr_test.go:36
↓ 1 callers
Method
EXPECT
()
internal/fixtures/index_list_expr/mocks_testify_index_list_expr_test.go:122
↓ 1 callers
Method
EXPECT
()
internal/fixtures/iface_typed_param/mocks_testify_iface_typed_param_test.go:38
↓ 1 callers
Method
EXPECT
()
internal/fixtures/iface_new_type/mocks_testify_iface_new_type_test.go:36
↓ 1 callers
Method
EXPECT
()
internal/fixtures/include_auto_generated/mocks_testify_includeautogenerated_test.go:36
↓ 1 callers
Method
EXPECT
()
internal/fixtures/interface_dir_relative/mocks/fixtures/interface_dir_relative/mocks.go:36
↓ 1 callers
Method
EXPECT
()
internal/fixtures/example_project/mocks_testify_example_project_test.go:159
↓ 1 callers
Method
EXPECT
()
internal/fixtures/iface_typed_param_lowercase/mocks_testify_iface_typed_param_lowercase_test.go:36
↓ 1 callers
Method
ExecDoB
()
internal/fixtures/method_args/same_name_arg_and_type/entity_test.go:14
↓ 1 callers
Method
ExecDoB0
()
internal/fixtures/method_args/same_name_arg_and_type/entity_test.go:19
↓ 1 callers
Method
ExecDoB0v2
()
internal/fixtures/method_args/same_name_arg_and_type/entity_test.go:24
↓ 1 callers
Function
Execute
Execute executes the cobra CLI workflow
internal/cmd/mockery.go:69
↓ 1 callers
Method
FetchData
FetchData provides a mock function for the type MockIssue766
internal/fixtures/mocks_testify_test_test.go:2855
↓ 1 callers
Method
FetchData
( fetchFunc func(x ...int) ([]int, error), )
internal/fixtures/issue_766.go:4
↓ 1 callers
Function
FirstIsLower
FirstIsLower returns whether or not the string's first character is lowercase. If the string is empty, false is returned. If the first character is a
template_funcs/functions.go:109
↓ 1 callers
Function
Foo
(s Stringer)
internal/fixtures/example_project/string_test.go:9
↓ 1 callers
Method
Foo
Foo provides a mock function for the type MockNilRun
internal/fixtures/mocks_testify_test_test.go:3146
↓ 1 callers
Method
Foo
Foo provides a mock function for the type MockAliasToInterface3
internal/fixtures/type_alias/mocks_testify_type_alias_test.go:42
↓ 1 callers
Method
Foo
()
internal/fixtures/type_alias/interface.go:12
↓ 1 callers
Method
Func
Func provides a mock function for the type MockIndexListExpr
internal/fixtures/index_list_expr/mocks_testify_index_list_expr_test.go:127
↓ 1 callers
Method
Generate
( ctx context.Context, interfaces []*Interface, )
internal/template_generator.go:383
↓ 1 callers
Method
Get
Get calls GetFunc.
internal/fixtures/mocks_matryer_test_test.go:3000
↓ 1 callers
Method
Get
Get calls GetFunc.
internal/fixtures/mocks_matryer_test_test.go:3084
↓ 1 callers
Method
GetInterfaceConfig
(ctx context.Context, interfaceName string, directiveConfig *Config)
config/config.go:450
↓ 1 callers
Method
GetLocalPrefix
()
config/config.go:601
↓ 1 callers
Function
GetMinorSemver
GetMinorSemver returns the semantic version up to and including the minor version.
internal/logging/logging.go:54
↓ 1 callers
Method
GetPackages
GetPackages returns a list of the packages that are defined in the `packages` config section.
config/config.go:413
← previous
next →
101–200 of 1,773, ranked by callers