moq

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2022 License: MIT Imports: 10 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
	StubImpl       bool
	IncludeHydrate bool
	SkipEnsure     bool
}

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(cfg Config) (*Mocker, error)

New makes a new Mocker for the specified package directory.

func (*Mocker) Mock

func (m *Mocker) Mock(w io.Writer, namePairs ...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