Documentation ¶
Index ¶
- func AllImported(pkg *loader.PackageInfo) []*types.Package
- func FmtImports(pkgs []*types.Package, current *types.Package) string
- func FuncToParams(s *types.Func) []*types.Var
- func FuncToResults(s *types.Func) []*types.Var
- func IsContainedInPackage(pkg *types.Package, typ types.Type) bool
- func ListSetters(typ *types.Named, onlyExported bool) []*types.Func
- func ObjectToFields(s types.Object) []*types.Var
- func ObjectToTags(s types.Object) []string
- func SamePackage(a *types.Package, b *types.Package) bool
- func SearchConstructor(typ *types.Named) *types.Func
- func SearchField(typ types.Type, paramName string, onlyExported bool) *types.Var
- func SearchGetValueStrAndResultType(typ types.Type, paramName string, onlyExported bool) (string, types.Type)
- func SearchGetter(typ *types.Named, paramName string, onlyExported bool) *types.Func
- func SearchPackage(pkg *loader.PackageInfo, name string) *types.Package
- func SearchSetter(typ *types.Named, paramName string, onlyExported bool) *types.Func
- func StructToFields(s *types.Struct) []*types.Var
- func StructToTags(s *types.Struct) []string
- func TypeToEnumValues(t types.Type) []*types.Const
- func TypeToFields(s types.Type) []*types.Var
- func TypeToPackage(typ types.Type) *types.Package
- func TypeToTags(s types.Type) []string
- type Printer
- func (p Printer) FillConstructor(constructor *types.Func, sourceName string, sourceType types.Type, nestNum int) (string, error)
- func (p Printer) PrintAssignToSetters(sourceName string, sourceType types.Type, targetName string, ...) (string, error)
- func (p Printer) PrintConverterWitoutErrorCheck(sourceName string, sourceType types.Type, targetType types.Type) (string, error)
- func (p Printer) PrintGetValue(parentName string, parentType types.Type, targetName string) (string, error)
- func (p Printer) PrintRelativeConst(c *types.Const) string
- func (p Printer) PrintRelativeFuncName(f *types.Func) string
- func (p Printer) PrintRelativeObject(t types.Object) string
- func (p Printer) PrintRelativeType(t types.Type) string
- func (m *Printer) SetPkgPathToName(s map[string]string)
- func (p Printer) ToStringConverter(sourceName string, sourceType types.Type) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllImported ¶
func AllImported(pkg *loader.PackageInfo) []*types.Package
func ObjectToTags ¶
func SearchGetter ¶
func SearchPackage ¶
func SearchPackage(pkg *loader.PackageInfo, name string) *types.Package
func SearchSetter ¶
func StructToTags ¶
func TypeToTags ¶
Types ¶
type Printer ¶
type Printer struct {
// contains filtered or unexported fields
}
genconstructor
func NewPrinter ¶
func (Printer) FillConstructor ¶
func (Printer) PrintAssignToSetters ¶
func (Printer) PrintConverterWitoutErrorCheck ¶
func (Printer) PrintGetValue ¶
func (*Printer) SetPkgPathToName ¶
Click to show internal directories.
Click to hide internal directories.