template

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommandData

type CommandData struct {
	PackageName  string
	Imports      []*internalTypes.Type
	CommandName  string
	Fields       []*FieldData
	Constructors []string
	Methods      []string
}

type ConstructorData

type ConstructorData struct {
	CommandName string
	Mutable     bool
	Name        string
	Fields      []*FieldData
}

func (*ConstructorData) UniqueValue

func (c *ConstructorData) UniqueValue() any

type FieldData

type FieldData struct {
	CommandName string
	Mutable     bool
	Name        string
	Pointer     string
	Type        string
}

func (*FieldData) UniqueValue

func (c *FieldData) UniqueValue() any

type Template

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

func NewTemplate

func NewTemplate() (*Template, error)

func (*Template) ExecuteCommandTemplate

func (t *Template) ExecuteCommandTemplate(writer io.Writer, data *CommandData) error

func (*Template) ExecuteConstructorTemplate

func (t *Template) ExecuteConstructorTemplate(writer io.Writer, data *ConstructorData) error

func (*Template) ExecuteGetterTemplate

func (t *Template) ExecuteGetterTemplate(writer io.Writer, data *FieldData) error

func (*Template) ExecuteHaserTemplate

func (t *Template) ExecuteHaserTemplate(writer io.Writer, data *FieldData) error

func (*Template) ExecuteSetterTemplate

func (t *Template) ExecuteSetterTemplate(writer io.Writer, data *FieldData) error

Jump to

Keyboard shortcuts

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