generator

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GenerateCommand

type GenerateCommand struct {
	GenerateToCommand
	// PackagePath path of parsed package
	PackagePath string
	// DestinationPath path of destination for generated files
	DestinationPath string
	// GeneratedFileName name of generated file
	GeneratedFileName string
}

GenerateCommand ...

type GenerateToCommand

type GenerateToCommand struct {
	Structs                   []parser.Struct
	TypeAlias                 []parser.TypeAlias
	PackageName               string
	IsGenerateInParsedPackage bool
	ForceExtractFromPtr       bool
	// PackageImportPath is import path to package
	PackageImportPath string
}

type Generator

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

func NewGenerator

func NewGenerator(opts ...Option) *Generator

func (*Generator) Generate

func (g *Generator) Generate(cmd GenerateCommand) error

func (*Generator) GenerateTo

func (g *Generator) GenerateTo(cmd GenerateToCommand, w io.Writer) error

type Option

type Option func(o *options)

func WithTagsAdder

func WithTagsAdder(tagsAdder tagsAdder) Option

WithTagsAdder ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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