ifacer

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ifacer

type Ifacer struct {
	Parser *mockery.Parser

	IfaceName string

	StructName string

	IfacePath string

	PackageName string

	Methods []Method

	//implements interface context
	Content string

	Star string

	OutFile string

	//import from interface file
	PkgNoConflictImport map[string]pkg.Import

	//import in the interface
	IfaceUsingIngImport map[string]string

	UsingImportStr string
	// contains filtered or unexported fields
}

func NewIface

func NewIface(writer file_dir.IfaceWriter) *Ifacer

func (*Ifacer) GenMethods

func (f *Ifacer) GenMethods(interacer *types.Interface)

func (*Ifacer) ManageNoConflictImport

func (f *Ifacer) ManageNoConflictImport(imports []*types.Package) bool

func (*Ifacer) Process

func (f *Ifacer) Process() error

func (*Ifacer) Run

func (f *Ifacer) Run(v *viper.Viper) error

type Method

type Method struct {
	FuncName string

	ArgStr string

	ReturnTypeStr string

	ReturnStr string

	InitReturnVarStr string

	ReturnVar []string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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