gen

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldComplex

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

func (*FieldComplex) Generate

func (slf *FieldComplex) Generate(
	fieldNames []*ast.Ident,
	fieldType ast.Expr,
) (
	fields []field,
	imports map[string]string,
)

type FieldInterface

type FieldInterface struct{}

func (*FieldInterface) Generate

func (slf *FieldInterface) Generate(
	fieldNames []*ast.Ident,
	fieldType ast.Expr,
) (
	fields []field,
	imports map[string]string,
)

type FieldObj

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

func (*FieldObj) Generate

func (slf *FieldObj) Generate(
	fieldNames []*ast.Ident,
	fieldType ast.Expr,
) (
	fields []field,
	imports map[string]string,
)

type FieldSel

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

func (*FieldSel) Generate

func (slf *FieldSel) Generate(
	fieldNames []*ast.Ident,
	fieldType ast.Expr,
) (
	fields []field,
	imports map[string]string,
)

type FieldSimple

type FieldSimple struct{}

func (*FieldSimple) Generate

func (slf *FieldSimple) Generate(
	fieldNames []*ast.Ident,
	fieldType ast.Expr,
) (
	fields []field,
	imports map[string]string,
)

type Generator

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

func NewGenerator

func NewGenerator(
	pkg *fc.Package,
	pkgOutName string,
	imports map[string]string,
	params *ast.FieldList,
	defs map[string]struct{},
) *Generator

func (*Generator) Format

func (slf *Generator) Format() ([]byte, error)

func (*Generator) Generate

func (slf *Generator) Generate(st fc.Struct) *Generator

func (*Generator) WriteMethods

func (slf *Generator) WriteMethods(
	stName,
	stTypePtr,
	stType string,
	fields []field,
	generics []field,
)

Jump to

Keyboard shortcuts

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