3
0

Add ability to customize package name for typeset codegen

This commit is contained in:
Denis Arh
2019-04-03 12:01:16 +02:00
parent cfeee9153a
commit 9e92b43923

View File

@@ -13,7 +13,7 @@ import (
"text/template"
)
const tmplTypeSet = `package types
const tmplTypeSet = `package {{ .Package }}
{{ if .Imports }}
import (
@@ -110,6 +110,7 @@ func main() {
)
payload := struct {
Package string
Sets []string
Imports []string
@@ -121,6 +122,7 @@ func main() {
flag.StringVar(&stdTypesStr, "types", "", "Comma separated list of types")
flag.StringVar(&importsStr, "imports", "", "Comma separated list of imports")
flag.StringVar(&payload.Package, "package", "types", "Package name")
flag.BoolVar(&payload.WithPrimaryKey, "with-primary-key", true, "Generate types with ID field")