template

package
v0.0.0-...-87bc42c Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: GPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// DoNotEditHead added to the beginning of a file to prompt the user not to edit
	DoNotEditHead = "// Code generated by sqlx_gen. DO NOT EDIT."
)

Variables

View Source
var Count string
View Source
var Delete string
View Source
var Field string
View Source
var Import string
View Source
var Insert string
View Source
var List string
View Source
var ModelGen = fmt.Sprintf(`%s

package {{.pkg}}
{{.imports}}
{{.tableName}}
{{.vars}}
{{.types}}
{{.insert}}
{{.delete}}
{{.update}}
{{.list}}
{{.count}}
`, DoNotEditHead)

ModelGen defines a template for model

View Source
var TableName string
View Source
var Types string
View Source
var Update string

Functions

This section is empty.

Types

type DefaultTemplate

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

DefaultTemplate

func With

func With(name string) *DefaultTemplate

func (*DefaultTemplate) Execute

func (t *DefaultTemplate) Execute(data any) (*bytes.Buffer, error)

Execute

func (*DefaultTemplate) GoFmt

func (t *DefaultTemplate) GoFmt(format bool) *DefaultTemplate

func (*DefaultTemplate) Parse

func (t *DefaultTemplate) Parse(text string) *DefaultTemplate

func (*DefaultTemplate) SaveTo

func (t *DefaultTemplate) SaveTo(data any, path string, forceUpdate bool) error

SaveTo

Jump to

Keyboard shortcuts

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