internal

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// OutputFlag is the flag for the output.
	OutputFlag *gcgen.OutputLocVal

	// StructFieldsFlag is the flag for the struct fields.
	StructFieldsFlag *gcgen.StructFieldsVal

	// GenericsSignFlag is the flag for the generics sign.
	GenericsSignFlag *gcgen.GenericsSignVal

	// TypeNameFlag is the flag for the type name.
	TypeNameFlag *string
)
View Source
var (
	// Logger is the logger for the package.
	Logger *log.Logger

	// Generator is the generator for the package.
	Generator *gcgen.CodeGenerator[*GenData]
)

Functions

func Parse

func Parse() (string, error)

Types

type GenData

type GenData struct {
	// PackageName is the name of the package.
	PackageName string

	// TypeName is the name of the type.
	TypeName string

	// TypeSig is the signature of the type.
	TypeSig string

	// Fields is the list of fields.
	Fields map[string]string

	// ParamList is the list of parameters.
	ParamList string

	// AssignmentMap is the map of assignments.
	AssignmentMap map[string]string

	// Generics is the list of generics.
	Generics string

	// Dependencies is the list of dependencies.
	Dependencies []string

	// Stringer is the stringer for the type.
	Stringer []string
}

GenData is the data for the generator.

func (*GenData) SetPackageName

func (g *GenData) SetPackageName(pkg_name string)

SetPackageName implements the ggen.Generater interface.

Jump to

Keyboard shortcuts

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