generator

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateMocks

func GenerateMocks(wd, pkgName string, mocks []*MockDecl) (*gen.File, error)

GenerateMocks generates the complete code for all mocks

func GetMockName

func GetMockName(mock string) *mockNameDecl

Types

type FieldDecl

type FieldDecl struct {
	*loader.TypeDecl
	// contains filtered or unexported fields
}

func NewFieldDecl

func NewFieldDecl(name string, typeDecl *loader.TypeDecl) *FieldDecl

type MockDecl

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

func NewMockDecl

func NewMockDecl(name *mockNameDecl, field []*FieldDecl) *MockDecl

func (MockDecl) InterfaceName

func (m MockDecl) InterfaceName() string

func (MockDecl) TypeName

func (m MockDecl) TypeName() string

Jump to

Keyboard shortcuts

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