Mock

command
v0.0.0-...-79b2278 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 5, 2022 License: MIT Imports: 4 Imported by: 0

README

Mocking

Example: https://github.com/golang/mock

$ go install github.com/golang/mock/mockgen@v1.6.0

Two modes:

  • source (source file)
  • reflect (an import path, and a comma-separated list of symbols.)

Source mode generates mock interfaces from a source file. It is enabled by using the -source flag.

$ mockgen \
  --source=foo.go \
  --destination=mock_test.go \
  --package=async_test

Documentation

Overview

Package mock_main is a generated GoMock package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL