Add support for database enum types.
This commit is contained in:
parent
273bf1ed4c
commit
2c7a9f5058
9 changed files with 202 additions and 22 deletions
|
|
@ -6,6 +6,7 @@ import (
|
|||
"go/format"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"text/template"
|
||||
)
|
||||
|
||||
|
|
@ -50,7 +51,7 @@ func generateTemplate(templateText string, templateData interface{}) ([]byte, er
|
|||
|
||||
t, err := template.New("SqlBuilderTableTemplate").Funcs(template.FuncMap{
|
||||
"camelize": func(txt string) string {
|
||||
return snaker.SnakeToCamel(txt)
|
||||
return snaker.SnakeToCamel(strings.Replace(txt, "-", "_", -1))
|
||||
},
|
||||
}).Parse(templateText)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue