@@ -42,9 +42,6 @@ const SQLServiceFile = "sqls-service.go.tmpl"
4242const MySQLDaoFile = "mysql-dao.go.tmpl"
4343const SQLModelFile = "sqls-model.go.tmpl"
4444
45- // common file for common utility functions in controllers
46- const ControllersCommonFile = "common.go.tmpl"
47-
4845const DaoFile = "dao.go.tmpl"
4946const SQLiteDaoFile = "sqlite-dao.go.tmpl"
5047const MySQLDBConfigFile = "mysql.go.tmpl"
@@ -475,15 +472,6 @@ func (c *Copier) copyNoSQLDBResourceFiles(resourceName string, filePaths []*stri
475472 }
476473 filePaths = append (filePaths , & targetResourceControllerFileName )
477474
478- // copy controller common file to a generated project
479- targetResourceControllerCommonFileName := c .NodeDirectoryName + ControllersPath + "/" + ControllersCommonFile
480- _ , err = utils .CopyFile (targetResourceControllerCommonFileName , c .TemplatesRootPath + ControllersPath + "/" + ControllersCommonFile )
481- if err != nil {
482- log .Debugf ("error copying controller utils file: %v" , err )
483- return nil , err
484- }
485- filePaths = append (filePaths , & targetResourceControllerCommonFileName )
486-
487475 // copy model files to a generated project
488476 targetResourceModelFileName := c .NodeDirectoryName + ModelsPath + "/" + resourceName + "-" + strings .Replace (NoSQLModelFile , "nosqls-" , "" , 1 )
489477 _ , err = utils .CopyFile (targetResourceModelFileName , c .TemplatesRootPath + ModelsPath + "/" + NoSQLModelFile )
@@ -527,15 +515,6 @@ func (c *Copier) copySQLDBResourceFiles(resourceName string, filePaths []*string
527515 }
528516 filePaths = append (filePaths , & targetResourceControllerFileName )
529517
530- // copy controller common file to a generated project
531- targetResourceControllerCommonFileName := c .NodeDirectoryName + ControllersPath + "/" + ControllersCommonFile
532- _ , err = utils .CopyFile (targetResourceControllerCommonFileName , c .TemplatesRootPath + ControllersPath + "/" + ControllersCommonFile )
533- if err != nil {
534- log .Debugf ("error copying controller utils file: %v" , err )
535- return nil , err
536- }
537- filePaths = append (filePaths , & targetResourceControllerCommonFileName )
538-
539518 // copy service files to a generated project
540519 targetResourceServiceFileName := c .NodeDirectoryName + ServicesPath + "/" + resourceName + "-" + strings .Replace (SQLServiceFile , "sqls-" , "" , 1 )
541520 _ , err = utils .CopyFile (targetResourceServiceFileName , c .TemplatesRootPath + ServicesPath + "/" + SQLServiceFile )
0 commit comments