diff --git a/cmd/gen_model.go b/cmd/gen_model.go index f521d96..b054f8e 100644 --- a/cmd/gen_model.go +++ b/cmd/gen_model.go @@ -40,7 +40,7 @@ func commandGenModelE(cmd *cobra.Command, args []string) error { v := viper.New() v.SetConfigType("yaml") - v.SetConfigFile("database/.transform.yaml") + v.SetConfigFile("database/transform.yaml") if err := v.ReadInConfig(); err != nil { return err diff --git a/cmd/new_project.go b/cmd/new_project.go index 5fd2979..8f2bd16 100644 --- a/cmd/new_project.go +++ b/cmd/new_project.go @@ -26,7 +26,6 @@ func CommandNewProject(root *cobra.Command) { cmd := &cobra.Command{ Use: "project", Short: "new project", - Args: cobra.ExactArgs(1), RunE: commandNewProjectE, } diff --git a/templates/project/database/-transform.yaml.tpl b/templates/project/database/-transform.yaml.tpl deleted file mode 100755 index f16420c..0000000 --- a/templates/project/database/-transform.yaml.tpl +++ /dev/null @@ -1,4 +0,0 @@ -ignores: [] # ignore tables -types: - users: # table name - oauth: backend/pkg/pg.UserOAuth diff --git a/templates/project/database/transform.yaml.tpl b/templates/project/database/transform.yaml.tpl new file mode 100755 index 0000000..b685d5a --- /dev/null +++ b/templates/project/database/transform.yaml.tpl @@ -0,0 +1,5 @@ +# ignores: [] # ignore tables +# types: +# users: # table name +# oauth: {{.ModuleName}}/pkg/pg.UserOAuth +# \ No newline at end of file