tpl

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ModelTpl = Template.Lookup("model.tpl")
View Source
var ProtobufEnumMappingTpl = Template.Lookup("protobuf_enum_mapping.tpl")
View Source
var ProtobufEnumTpl = Template.Lookup("protobuf_enum.tpl")
View Source
var SqlDDLTpl = Template.Lookup("sql_ddl.tpl")
View Source
var Static embed.FS
View Source
var Template = template.Must(
	template.New("components").
		Funcs(TemplateFuncs).
		ParseFS(Static, "template/layout/*"),
)
View Source
var TemplateFuncs = template.FuncMap{
	"add":            func(a, b int) int { return a + b },
	"snakecase":      func(s string) string { return utils.SnakeCase(s, false) },
	"kebabcase":      func(s string) string { return utils.Kebab(s, false) },
	"camelcase":      func(s string) string { return utils.CamelCase(s, false) },
	"smallcamelcase": func(s string) string { return utils.SmallCamelCase(s, false) },
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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