generation

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateBuilder

func GenerateBuilder(typeSpec *ast.TypeSpec, imports []*Import, config *cmd.Config) (string, error)

GenerateBuilder generates the builder source code based on the given arguments.

Types

type Field

type Field struct {
	Name string
	Type string
	Tags string
}

func (*Field) GetUsedPackageName added in v0.0.6

func (f *Field) GetUsedPackageName() string

type Import added in v0.0.6

type Import struct {
	Name string
	Path string
}

func (*Import) GetName added in v0.0.6

func (i *Import) GetName() string

func (*Import) ToImport added in v0.0.6

func (i *Import) ToImport() string

type StructGenHelper

type StructGenHelper struct {
	Name    string
	Package string
	Fields  []*Field
	Imports []*Import
	// contains filtered or unexported fields
}

func (*StructGenHelper) ToSource

func (s *StructGenHelper) ToSource() string

Jump to

Keyboard shortcuts

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