MCPcopy
hub / github.com/vektra/mockery

github.com/vektra/mockery @v3.7.1 sqlite

repository ↗ · DeepWiki ↗ · release v3.7.1 ↗
2,431 symbols 7,708 edges 232 files 1,184 documented · 49%
README

mockery

go.dev reference GitHub go.mod Go version GitHub release (latest SemVer) Go Report Card codecov

mockery provides the ability to easily generate mocks for Golang interfaces using the stretchr/testify/mock package. It removes the boilerplate coding required to use mocks.

Documentation

Documentation is found at our GitHub Pages site.

Development

taskfile.dev is used for build tasks. Initialize all go build tools:

go mod download -x

You can run any of the steps listed in Taskfile.yml:

$ task test
task: [test] go test -v -coverprofile=coverage.txt ./...

Stargazers

Stargazers over time

Extension points exported contracts — how you extend this code

Example (Interface)
Example is an example [6 implementers]
internal/fixtures/same_name_imports.go
TypesPackage (Interface)
(no doc) [2 implementers]
template/package.go
Numbers (Interface)
Numbers defines the generic constraints of the arithmetic arguments.
template_funcs/functions.go
Requester (Interface)
Requester is an interface that defines a method for making HTTP requests. mockery:generate: true [72 implementers]
internal/fixtures/directive_comments_example/interface.go
Requester (Interface)
Requester is an interface that defines a method for making HTTP requests. mockery:generate: true [72 implementers]
internal/fixtures/directive_comments/directive_comments.go
MatryerRequester (Interface)
MatryerRequester is an interface that should be mocked with matryer's template mockery:generate: true mockery:template: [72 …
internal/fixtures/directive_comments/directive_comments.go
Server (Interface)
Server is an interface that defines a method for handling HTTP requests. mockery:generate: true mockery:structname: Fun [6 …
internal/fixtures/directive_comments/directive_comments.go

Core symbols most depended-on inside this repo

Get
called by 338
internal/fixtures/generic.go
Lock
called by 233
internal/fixtures/consul.go
Unlock
called by 233
internal/fixtures/consul.go
run
called by 170
internal/cmd/migrate.go
Error
called by 100
internal/fixtures/custom_error.go
Type
called by 30
template/var.go
Append
called by 26
internal/cmd/migrate.go
String
called by 25
internal/fixtures/example_project/pkg_with_submodules/submodule/string.go

Shape

Method 1,489
Struct 515
Function 284
Interface 124
TypeAlias 18
FuncType 1

Languages

Go100%

Modules by API surface

internal/fixtures/mocks_testify_test_test.go696 symbols
internal/fixtures/mocks_matryer_test_test.go320 symbols
internal/fixtures/mocks_io_test.go298 symbols
internal/fixtures/method_args/same_name_arg_and_type/mocks_testify_same_name_arg_and_type_test.go42 symbols
config/config.go36 symbols
internal/fixtures/example_project/replace_type/mocks_testify_replace_type_test.go32 symbols
internal/fixtures/type_alias/mocks_testify_type_alias_test.go30 symbols
internal/fixtures/iface_new_type/mocks_testify_iface_new_type_test.go30 symbols
internal/fixtures/directive_comments/mocks_testify_directive_comments_test.go30 symbols
template/method.go27 symbols
internal/fixtures/example_project/mocks_testify_example_project_test.go26 symbols
internal/fixtures/mocks_net_http_test.go22 symbols

Dependencies from manifests, versioned

4d63.com/gocheckcompilerdirectivesv1.2.1 · 1×
4d63.com/gochecknoglobalsv0.2.1 · 1×
dario.cat/mergov1.0.0 · 1×
github.com/4meepo/tagalignv1.3.4 · 1×
github.com/Abirdcfly/dupwordv0.0.14 · 1×
github.com/Antonboom/errnamev0.1.13 · 1×
github.com/Antonboom/nilnilv0.1.9 · 1×
github.com/Antonboom/testifylintv1.4.3 · 1×
github.com/BurntSushi/tomlv1.4.1-0.20240526193 · 1×
github.com/Crocmagnon/fatcontextv0.4.0 · 1×
github.com/Djarvur/go-err113v0.0.0-2021010821221 · 1×
github.com/GaijinEntertainment/go-exhaustruct/v3v3.3.0 · 1×

For agents

$ claude mcp add mockery \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact