generator

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: MIT Imports: 12 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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