@@ -42,9 +42,6 @@ const SQLServiceFile = "sqls-service.go.tmpl"
42
42
const MySQLDaoFile = "mysql-dao.go.tmpl"
43
43
const SQLModelFile = "sqls-model.go.tmpl"
44
44
45
- // common file for common utility functions in controllers
46
- const ControllersCommonFile = "common.go.tmpl"
47
-
48
45
const DaoFile = "dao.go.tmpl"
49
46
const SQLiteDaoFile = "sqlite-dao.go.tmpl"
50
47
const MySQLDBConfigFile = "mysql.go.tmpl"
@@ -475,15 +472,6 @@ func (c *Copier) copyNoSQLDBResourceFiles(resourceName string, filePaths []*stri
475
472
}
476
473
filePaths = append (filePaths , & targetResourceControllerFileName )
477
474
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
-
487
475
// copy model files to a generated project
488
476
targetResourceModelFileName := c .NodeDirectoryName + ModelsPath + "/" + resourceName + "-" + strings .Replace (NoSQLModelFile , "nosqls-" , "" , 1 )
489
477
_ , err = utils .CopyFile (targetResourceModelFileName , c .TemplatesRootPath + ModelsPath + "/" + NoSQLModelFile )
@@ -527,15 +515,6 @@ func (c *Copier) copySQLDBResourceFiles(resourceName string, filePaths []*string
527
515
}
528
516
filePaths = append (filePaths , & targetResourceControllerFileName )
529
517
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
-
539
518
// copy service files to a generated project
540
519
targetResourceServiceFileName := c .NodeDirectoryName + ServicesPath + "/" + resourceName + "-" + strings .Replace (SQLServiceFile , "sqls-" , "" , 1 )
541
520
_ , err = utils .CopyFile (targetResourceServiceFileName , c .TemplatesRootPath + ServicesPath + "/" + SQLServiceFile )
0 commit comments