generator

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseAndGenerate

func ParseAndGenerate(input string, interfaceNames []string, output string) error

ParseAndGenerate parses the given filename and generates the fakes

Types

type FunctionInfo

type FunctionInfo struct {
	Name      string
	Composite bool
	Params    []ParamInfo
	Results   []ParamInfo
}

type InterfaceGenInfo

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

func (InterfaceGenInfo) Filename

func (i InterfaceGenInfo) Filename() string

type InterfaceInfo

type InterfaceInfo struct {
	Name        string
	Methods     []FunctionInfo
	IsComposite bool
	Composites  []string
	Imports     []string
}

type ParamInfo

type ParamInfo struct {
	Name   []string
	Type   string
	Zero   string
	IsPtr  bool
	IsChan bool
	IsList bool
}

func (ParamInfo) TypeString

func (p ParamInfo) TypeString() string

func (ParamInfo) ZeroValue

func (p ParamInfo) ZeroValue() string

Directories

Path Synopsis
tests

Jump to

Keyboard shortcuts

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