constructor

package
v0.6.1-beta.2 Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const SubCmd = "new"

Variables

This section is empty.

Functions

This section is empty.

Types

type Field

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

func (*Field) HasJSONTag

func (f *Field) HasJSONTag() bool

func (*Field) JSONTag

func (f *Field) JSONTag() string

type Flags

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

type Generator

type Generator struct {
	*shoot.GeneratorBase
	// contains filtered or unexported fields
}

Generator holds the state of the analysis.

func New

func New() *Generator

func (*Generator) ListTypes

func (g *Generator) ListTypes() []string

func (*Generator) MakeData

func (g *Generator) MakeData(typeName string) (any, bool)

func (*Generator) ParseFlags

func (g *Generator) ParseFlags()

type TagCase

type TagCase string
const (
	TagCasePascal TagCase = "pascal"
	TagCaseCamel  TagCase = "camel"
	TagCaseLower  TagCase = "lower"
	TagCaseUpper  TagCase = "upper"
)

func (*TagCase) Set

func (v *TagCase) Set(value string) error

func (*TagCase) String

func (v *TagCase) String() string

type TmplData

type TmplData struct {
	*shoot.TmplDataBase
	// GoFile  string
	Imports string
	//All = Exported + Unexported
	AllList           []string
	NewMap            map[string]string
	GetSet            bool
	GetterList        []string
	SetterList        []string
	GetterIfaces      []string
	SetterIfaces      []string
	Option            bool
	DefaultList       []string
	DefaultValueMap   map[string]string
	JSON              bool
	JSONList          []string
	JSONTagMap        map[string]string
	JSONGetterList    []string
	JSONSetterList    []string
	ExportedList      []string
	EmbedList         []string
	Self              bool
	Short             bool
	NewParamsList     string
	NewBody           string
	TypeParamList     string
	TypeParamNameList string
	TypeMap           map[string]string
}

func NewTmplData

func NewTmplData(cmdline, version string) *TmplData

Jump to

Keyboard shortcuts

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