moq

package
v0.0.0-...-db6162c Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2020 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SrcDir    string
	PkgName   string
	Formatter string
}

Config specifies details about how interfaces should be mocked. SrcDir is the only field which needs be specified.

type Mocker

type Mocker struct {
	// contains filtered or unexported fields
}

Mocker can generate mock structs.

func New

func New(conf Config) (*Mocker, error)

New makes a new Mocker for the specified package directory.

func (*Mocker) Mock

func (m *Mocker) Mock(w io.Writer, names ...string) error

Mock generates a mock for the specified interface name.

Jump to

Keyboard shortcuts

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