Versions in this module Expand all Collapse all v0 v0.1.0 Dec 2, 2020 Changes in this version + const StatusErr + const StatusOK + func FormatDeclarativeParams(fieldList FieldList) (output string) + func FormatDeclarativeParamsWithVariadic(fieldList FieldList) (output string) + func FormatDeclarativeResults(fieldList FieldList) (output string) + func FormatInputParams(fieldList FieldList) (output string) + func FormatInputParamsWithVariadic(fieldList FieldList) (output string) + func FormatReturnZeroValueResults(fieldList FieldList) (output string) + func TypeString(t types.Type) string + func TypeZeroValue(t types.Type) string + type Command struct + Stderr io.Writer + Stdout io.Writer + func (c *Command) Run(args ...string) int + type Field struct + func NewField(name string, typ types.Type) *Field + func (f *Field) Name() string + func (f *Field) SetTag(tag reflect.StructTag) + func (f *Field) String() string + func (f *Field) Type() types.Type + type FieldList []*Field + func NewFieldListFromType(t types.Type) (FieldList, error) + func (fl *FieldList) Add(field *Field) + func (fl FieldList) At(i int) *Field + func (fl FieldList) Format(formatter fieldListFormatter) (output string) + func (fl FieldList) Len() int + func (fl FieldList) Less(i, j int) bool + func (fl FieldList) String() (output string) + func (fl FieldList) Swap(i, j int) + func (fl FieldList) Validate() error + type Func struct + func NewFunc(name string, params FieldList, results FieldList, receiver *Struct, ...) *Func + func (fn *Func) Name() string + func (fn *Func) Params() FieldList + func (fn *Func) Recv() *Struct + func (fn *Func) RecvName() string + func (fn *Func) Results() FieldList + func (fn *Func) SetBlockWriter(f func(*Func, io.Writer) error) + func (fn *Func) ValueReceiver() + func (fn *Func) Variadic() bool + func (fn *Func) WriteTo(w io.Writer) error + type GoFile struct + Import *Import + Package string + func NewGoFile() *GoFile + func (f *GoFile) Check() error + func (f *GoFile) Format() error + func (f *GoFile) Generate() error + type Import struct + func (im *Import) Add(pkg string) + func (im *Import) AddPackages(imports map[string]*packages.Package) + func (im *Import) At(i int) string + func (im *Import) Len() int + func (im *Import) Less(i, j int) bool + func (im *Import) Swap(i, j int) + func (im *Import) WriteTo(w io.Writer) error + type SimpleMock struct + func NewSimpleMock(name string, interFace *types.Interface) (*SimpleMock, error) + func (m *SimpleMock) Name() string + func (m *SimpleMock) WriteTo(w io.Writer) error + type Struct struct + func NewStruct(name string, fields FieldList) *Struct + func (s *Struct) AddField(field *Field) error + func (s *Struct) FieldList() FieldList + func (s *Struct) Name() string + func (s *Struct) Type() *types.Struct + func (s *Struct) WriteTo(w io.Writer) error