Documentation ¶
Index ¶
- Variables
- func GetGolangTemplate(name string, funcs template.FuncMap) *template.Template
- func GetPresetTemplate(name string) *template.Template
- func NewTemplate(name, content string, funcs template.FuncMap) *template.Template
- func RegisterLanguage(l *Language)
- type Formatter
- type Importter
- type Language
- type Packager
Constants ¶
This section is empty.
Variables ¶
View Source
var Golang = Language{ Name: "golang", Template: golangModelTemplate, Types: map[string]string{}, Funcs: template.FuncMap{ "Type": type2string, "Tag": tag2string, }, Formatter: rewrite.CleanImportsWriteGolangFile, Importter: genGoImports, Packager: genNameSpace, ExtName: ".go", }
Golang represents a golang language
Functions ¶
func GetGolangTemplate ¶
func GetPresetTemplate ¶ added in v0.9.1
func NewTemplate ¶ added in v0.3.1
Types ¶
type Language ¶
type Language struct { Name string ExtName string Template string Types map[string]string Funcs template.FuncMap Formatter Formatter Importter Importter Packager Packager }
Language represents a languages supported when reverse codes
func (*Language) FixTarget ¶
func (l *Language) FixTarget(target *config.ReverseTarget)
Click to show internal directories.
Click to hide internal directories.