generator

package
v0.0.0-...-07d11ac Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2021 License: LGPL-2.1 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileTemplate

type FileTemplate struct {
	FileName        string // name of file without extension or directory
	Package         string
	MockPackage     string
	MockDirectory   string
	TargetInterface string
	Methods         []MethodTemplate
}

func NewFileTemplate

func NewFileTemplate(ast []*ast.FuncDecl, pkg *ast.Package, targetInterface, mockDirectory, filePrefix string) (ft *FileTemplate)

func (*FileTemplate) Generate

func (f *FileTemplate) Generate(targetDirectory string) (string, error)

type IdentifierTemplate

type IdentifierTemplate struct {
	Name    string
	Type    string
	HasNext bool
}

type MethodTemplate

type MethodTemplate struct {
	Name      string
	Arguments []IdentifierTemplate
	Returns   []IdentifierTemplate
}

Jump to

Keyboard shortcuts

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