Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Template = `
package {{param "packageName"}}
{{ if .Imports }}
import (
{{- range .Imports}}
"{{.}}"
{{- end}}
)
{{end}}
{{$structName := CamelizeStr .Name true}}
type {{$structName}} struct {
{{- range .Columns}}
{{CamelizeStr .Name true}} {{.GoType}} ` + "{{.Tag}}" + `
{{- end}}
}
{{$firstChar := FirstCharacter .Name}}
func ({{$firstChar}} {{$structName }}) TableName() string {
return "{{.Name}}"
}
`
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.