From 564002f84b00c8274d4fe5e1b3ad2f03f2797306 Mon Sep 17 00:00:00 2001 From: Nikitin Aleksandr Date: Mon, 23 Sep 2024 13:33:40 +0300 Subject: [PATCH] =?UTF-8?q?=D1=81=D0=B4=D0=B5=D0=BB=D0=B0=D0=BB=20=D1=83?= =?UTF-8?q?=D0=B1=D1=80=D0=B0=D0=BB=20=D0=B8=D0=B7=20constants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cmd/crud_generator/main.go | 2 ++ internal/config/config.go | 5 +++-- internal/create_files/alias/alias.go | 4 ++-- internal/create_files/constants_file/constants_file.go | 4 ++-- internal/create_files/crud/crud_functions.go | 6 +++--- internal/create_files/crud_starter/crud_starter.go | 6 +++--- .../crud_starter_tables/crud_starter_tables.go | 10 +++++----- internal/create_files/crud_tables/crud_tables_cache.go | 5 ++--- internal/create_files/crud_tables/crud_tables_crud.go | 5 ++--- .../create_files/crud_tables/crud_tables_findby.go | 5 ++--- .../create_files/crud_tables/crud_tables_findmassby.go | 5 ++--- .../create_files/crud_tables/crud_tables_readall.go | 5 ++--- .../create_files/crud_tables/crud_tables_update.go | 5 ++--- .../entities_tables/entities_tables_crud.go | 8 ++++---- .../entities_tables/entities_tables_findby.go | 4 ++-- .../entities_tables/entities_tables_findmassby.go | 6 +++--- .../entities_tables/entities_tables_readall.go | 4 ++-- .../entities_tables/entities_tables_update.go | 4 ++-- internal/create_files/env_file/env_file.go | 6 +++--- .../create_files/grpc_client/grpc_client_client.go | 6 +++--- .../create_files/grpc_client_func/grpc_client_func.go | 6 +++--- .../grpc_client_tables/grpc_client_tables_cache.go | 5 ++--- .../grpc_client_tables/grpc_client_tables_crud.go | 5 ++--- .../grpc_client_tables/grpc_client_tables_findby.go | 5 ++--- .../grpc_client_tables_findmassby.go | 5 ++--- .../grpc_client_tables/grpc_client_tables_readall.go | 5 ++--- .../grpc_client_tables/grpc_client_tables_update.go | 5 ++--- internal/create_files/main_file/main_file.go | 3 +-- internal/create_files/makefile/makefile.go | 4 ++-- .../create_files/nrpc_client/nrpc_client_client.go | 5 ++--- .../nrpc_client_tables/nrpc_client_tables.go | 4 ++-- internal/create_files/protobuf/protobuf.go | 3 +-- internal/create_files/readme_file/readme_file.go | 5 ++--- .../create_files/server_grpc_func/server_grpc_func.go | 3 +-- .../server_grpc_starter/server_grpc_starter.go | 3 +-- .../server_grpc_tables/server_grpc_tables_cache.go | 5 ++--- .../server_grpc_tables/server_grpc_tables_crud.go | 5 ++--- .../server_grpc_tables/server_grpc_tables_findby.go | 5 ++--- .../server_grpc_tables_findmassby.go | 5 ++--- .../server_grpc_tables/server_grpc_tables_readall.go | 5 ++--- .../server_grpc_tables/server_grpc_tables_update.go | 5 ++--- .../server_nrpc_starter/server_nrpc_starter.go | 3 +-- internal/create_files/tables_tables/tables_tables.go | 3 +-- 43 files changed, 92 insertions(+), 115 deletions(-) diff --git a/cmd/crud_generator/main.go b/cmd/crud_generator/main.go index 9e25e02..2807e71 100644 --- a/cmd/crud_generator/main.go +++ b/cmd/crud_generator/main.go @@ -34,4 +34,6 @@ func StartApp() { println(constants.TEXT_HELP) } + log.Info("stop app") + } diff --git a/internal/config/config.go b/internal/config/config.go index 48b65aa..8afb62e 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -5,6 +5,7 @@ import ( ConfigMain "github.com/ManyakRus/starter/config_main" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" + "io/fs" "os" "strconv" "strings" @@ -155,7 +156,7 @@ type SettingsINI struct { TEMPLATES_CRUD_FUNC_TEST_FILENAME string // - FILE_PERMISSIONS uint32 //= 0666 + FILE_PERMISSIONS fs.FileMode //= 0666 GENERATION_PROTO_FILENAME string @@ -891,7 +892,7 @@ func FillSettings() { x = 0666 log.Error("FILE_PERMISSIONS error: ", err) } - Settings.FILE_PERMISSIONS = uint32(x) + Settings.FILE_PERMISSIONS = fs.FileMode(x) // Name = "GENERATION_PROTO_FILENAME" diff --git a/internal/create_files/alias/alias.go b/internal/create_files/alias/alias.go index 05ba5cc..b2462d9 100644 --- a/internal/create_files/alias/alias.go +++ b/internal/create_files/alias/alias.go @@ -5,7 +5,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" ) @@ -49,7 +49,7 @@ func CreateAlias() error { TextAlias := string(bytes) //запись файла в bin - err = os.WriteFile(FilenameReadyAlias, []byte(TextAlias), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyAlias, []byte(TextAlias), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/constants_file/constants_file.go b/internal/create_files/constants_file/constants_file.go index d4124d7..90f2479 100644 --- a/internal/create_files/constants_file/constants_file.go +++ b/internal/create_files/constants_file/constants_file.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -53,7 +53,7 @@ func CreateFileConstants() error { TextConstants = strings.ReplaceAll(TextConstants, ServiceNameTemplate, ServiceNameNew) //запись файла - err = os.WriteFile(FilenameReadyConstants, []byte(TextConstants), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyConstants, []byte(TextConstants), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud/crud_functions.go b/internal/create_files/crud/crud_functions.go index 864d016..a7a16f9 100644 --- a/internal/create_files/crud/crud_functions.go +++ b/internal/create_files/crud/crud_functions.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -65,7 +65,7 @@ func CreateCrud() error { TextCrud = create_files.Delete_EmptyImport(TextCrud) //запись файла - err = os.WriteFile(FilenameReadyCrud, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCrud, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } @@ -120,7 +120,7 @@ func CreateCrudTest() error { TextCrud = create_files.Delete_EmptyImport(TextCrud) //запись файла - err = os.WriteFile(FilenameReadyCrud, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCrud, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_starter/crud_starter.go b/internal/create_files/crud_starter/crud_starter.go index 62a1905..3a56cc3 100644 --- a/internal/create_files/crud_starter/crud_starter.go +++ b/internal/create_files/crud_starter/crud_starter.go @@ -7,7 +7,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "sort" "strings" @@ -90,7 +90,7 @@ func CreateFile_CrudStarter(MapAll map[string]*types.Table) error { TextCrudStarter = create_files.Delete_EmptyImport(TextCrudStarter) //запись файла - err = os.WriteFile(FilenameReadyCrudStarter, []byte(TextCrudStarter), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCrudStarter, []byte(TextCrudStarter), config.Settings.FILE_PERMISSIONS) return err } @@ -381,7 +381,7 @@ func CreateFileCrudStarter_manual(MapAll map[string]*types.Table) error { TextCrudStarter = create_files.Delete_EmptyImport(TextCrudStarter) //запись файла - err = os.WriteFile(FilenameReadyCrudStarter, []byte(TextCrudStarter), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCrudStarter, []byte(TextCrudStarter), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_starter_tables/crud_starter_tables.go b/internal/create_files/crud_starter_tables/crud_starter_tables.go index 769d09d..82c12a7 100644 --- a/internal/create_files/crud_starter_tables/crud_starter_tables.go +++ b/internal/create_files/crud_starter_tables/crud_starter_tables.go @@ -7,7 +7,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -120,7 +120,7 @@ func CreateFiles(Table1 *types.Table) error { TextDB = create_files.Delete_EmptyImport(TextDB) //запись файла - err = os.WriteFile(FilenameReadyDB, []byte(TextDB), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyDB, []byte(TextDB), config.Settings.FILE_PERMISSIONS) return err } @@ -180,7 +180,7 @@ func CreateFiles_Test(Table1 *types.Table) error { TextDB = create_files.Delete_EmptyImport(TextDB) //запись файла - err = os.WriteFile(FilenameReadyDB, []byte(TextDB), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyDB, []byte(TextDB), config.Settings.FILE_PERMISSIONS) return err } @@ -244,7 +244,7 @@ func CreateFiles_manual(Table1 *types.Table) error { TextManual = create_files.Delete_EmptyImport(TextManual) //запись файла - err = os.WriteFile(FilenameReadyManual, []byte(TextManual), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyManual, []byte(TextManual), config.Settings.FILE_PERMISSIONS) return err } @@ -313,7 +313,7 @@ func CreateFiles_manual_test(Table1 *types.Table) error { TextManual = create_files.Delete_EmptyImport(TextManual) //запись файла - err = os.WriteFile(FilenameReadyManual, []byte(TextManual), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyManual, []byte(TextManual), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_tables/crud_tables_cache.go b/internal/create_files/crud_tables/crud_tables_cache.go index 5f2f55b..a44ea11 100644 --- a/internal/create_files/crud_tables/crud_tables_cache.go +++ b/internal/create_files/crud_tables/crud_tables_cache.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -104,7 +103,7 @@ func CreateFiles_Cache(Table1 *types.Table) error { TextCache = create_files.Delete_EmptyLines(TextCache) //запись файла - err = os.WriteFile(FilenameReadyCache, []byte(TextCache), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCache, []byte(TextCache), config.Settings.FILE_PERMISSIONS) return err } @@ -191,7 +190,7 @@ func CreateFiles_Cache_Test(Table1 *types.Table) error { TextCache = create_files.AddSkipNow(TextCache, Table1) //запись файла - err = os.WriteFile(FilenameReadyCache, []byte(TextCache), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCache, []byte(TextCache), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_tables/crud_tables_crud.go b/internal/create_files/crud_tables/crud_tables_crud.go index 8183e4d..7d06526 100644 --- a/internal/create_files/crud_tables/crud_tables_crud.go +++ b/internal/create_files/crud_tables/crud_tables_crud.go @@ -8,7 +8,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "sort" "strings" @@ -134,7 +133,7 @@ func CreateFiles(Table1 *types.Table) error { TextDB = create_files.Delete_EmptyLines(TextDB) //запись файла - err = os.WriteFile(FilenameReadyDB, []byte(TextDB), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyDB, []byte(TextDB), config.Settings.FILE_PERMISSIONS) return err } @@ -221,7 +220,7 @@ func CreateFiles_Test(Table1 *types.Table) error { TextDB = create_files.Delete_EmptyLines(TextDB) //запись файла - err = os.WriteFile(FilenameReadyDB, []byte(TextDB), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyDB, []byte(TextDB), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_tables/crud_tables_findby.go b/internal/create_files/crud_tables/crud_tables_findby.go index df3f13a..b4a9d2e 100644 --- a/internal/create_files/crud_tables/crud_tables_findby.go +++ b/internal/create_files/crud_tables/crud_tables_findby.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -103,7 +102,7 @@ func CreateFiles_FindBy(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } @@ -253,7 +252,7 @@ func CreateFiles_FindBy_Test(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_tables/crud_tables_findmassby.go b/internal/create_files/crud_tables/crud_tables_findmassby.go index c44aace..4a210b3 100644 --- a/internal/create_files/crud_tables/crud_tables_findmassby.go +++ b/internal/create_files/crud_tables/crud_tables_findmassby.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -103,7 +102,7 @@ func CreateFiles_FindMassBy(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } @@ -270,7 +269,7 @@ func CreateFiles_FindMassBy_Test(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_tables/crud_tables_readall.go b/internal/create_files/crud_tables/crud_tables_readall.go index 6eff4d0..0cc471e 100644 --- a/internal/create_files/crud_tables/crud_tables_readall.go +++ b/internal/create_files/crud_tables/crud_tables_readall.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -103,7 +102,7 @@ func CreateFiles_ReadAll(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } @@ -232,7 +231,7 @@ func CreateFiles_ReadAll_Test(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/crud_tables/crud_tables_update.go b/internal/create_files/crud_tables/crud_tables_update.go index 0f07957..3e11030 100644 --- a/internal/create_files/crud_tables/crud_tables_update.go +++ b/internal/create_files/crud_tables/crud_tables_update.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "sort" "strings" @@ -105,7 +104,7 @@ func CreateFiles_UpdateEveryColumn(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReadyCrudUpdateFunc, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCrudUpdateFunc, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } @@ -280,7 +279,7 @@ func CreateFiles_UpdateEveryColumn_Test(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReadyCrudUpdate, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCrudUpdate, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/entities_tables/entities_tables_crud.go b/internal/create_files/entities_tables/entities_tables_crud.go index 444e172..4585b71 100644 --- a/internal/create_files/entities_tables/entities_tables_crud.go +++ b/internal/create_files/entities_tables/entities_tables_crud.go @@ -8,7 +8,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "sort" "strings" @@ -110,7 +110,7 @@ func CreateFiles_Model_struct(Table1 *types.Table, DirTemplatesModel, DirReadyMo TextModel = create_files.Delete_EmptyImport(TextModel) //запись файла - err = os.WriteFile(FilenameReadyModel, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyModel, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err } @@ -211,7 +211,7 @@ func CreateFiles_Model_crud(Table1 *types.Table, DirTemplatesModel, DirReadyMode TextModel = DeleteFunctions(TextModel, TableName, types.MapModelCrudDeleteFunctions) //запись файла - err = os.WriteFile(FilenameReadyModel, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyModel, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err } @@ -526,7 +526,7 @@ func CreateFiles_Model_Manual(Table1 *types.Table, DirTemplatesModel, DirReadyMo TextModel = create_files.Delete_EmptyImport(TextModel) //запись файла - err = os.WriteFile(FilenameReadyModel, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyModel, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/entities_tables/entities_tables_findby.go b/internal/create_files/entities_tables/entities_tables_findby.go index 9a81518..5c77207 100644 --- a/internal/create_files/entities_tables/entities_tables_findby.go +++ b/internal/create_files/entities_tables/entities_tables_findby.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -103,7 +103,7 @@ func CreateFiles_FindBy(Table1 *types.Table) error { TextModel = create_files.Delete_EmptyLines(TextModel) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/entities_tables/entities_tables_findmassby.go b/internal/create_files/entities_tables/entities_tables_findmassby.go index 3aee78a..13fc080 100644 --- a/internal/create_files/entities_tables/entities_tables_findmassby.go +++ b/internal/create_files/entities_tables/entities_tables_findmassby.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -103,7 +103,7 @@ func CreateFiles_FindMassBy(Table1 *types.Table) error { TextModel = create_files.Delete_EmptyLines(TextModel) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err } @@ -258,7 +258,7 @@ func CreateFiles_FindMassBy_Test(Table1 *types.Table) error { TextCrud = create_files.Delete_EmptyLines(TextCrud) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextCrud), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextCrud), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/entities_tables/entities_tables_readall.go b/internal/create_files/entities_tables/entities_tables_readall.go index 4e5c8ef..08c8c2d 100644 --- a/internal/create_files/entities_tables/entities_tables_readall.go +++ b/internal/create_files/entities_tables/entities_tables_readall.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -103,7 +103,7 @@ func CreateFiles_ReadAll(Table1 *types.Table) error { TextModel = create_files.Delete_EmptyLines(TextModel) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/entities_tables/entities_tables_update.go b/internal/create_files/entities_tables/entities_tables_update.go index aedd53a..33c5c79 100644 --- a/internal/create_files/entities_tables/entities_tables_update.go +++ b/internal/create_files/entities_tables/entities_tables_update.go @@ -7,7 +7,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "sort" "strings" @@ -89,7 +89,7 @@ func CreateFiles_UpdateEveryColumn(Table1 *types.Table) error { TextModel = TextModel + TextNew //запись файла - err = os.WriteFile(FilenameReadyModel, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyModel, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/env_file/env_file.go b/internal/create_files/env_file/env_file.go index 8cc5c1d..eb88ea4 100644 --- a/internal/create_files/env_file/env_file.go +++ b/internal/create_files/env_file/env_file.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" "github.com/ManyakRus/starter/postgres_gorm" - "io/fs" + "os" "strings" ) @@ -92,13 +92,13 @@ func CreateENV() error { TextMakefile = ReplaceVariable(TextMakefile, VariableName, Value) //запись файла в корень проекта - err = os.WriteFile(FilenameReadyENV, []byte(TextMakefile), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyENV, []byte(TextMakefile), config.Settings.FILE_PERMISSIONS) //запись файла в bin Dir := DirReady + "bin" + micro.SeparatorFile() folders.CreateFolder(Dir) FilenameReadyENV = Dir + config.Settings.ENV_FILENAME - err = os.WriteFile(FilenameReadyENV, []byte(TextMakefile), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyENV, []byte(TextMakefile), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client/grpc_client_client.go b/internal/create_files/grpc_client/grpc_client_client.go index 1f85358..614d979 100644 --- a/internal/create_files/grpc_client/grpc_client_client.go +++ b/internal/create_files/grpc_client/grpc_client_client.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -89,7 +89,7 @@ func CreateGRPCClient() error { TextGRPCClient = create_files.Delete_EmptyImport(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReadyMain, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyMain, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } @@ -144,7 +144,7 @@ func CreateGRPCClientTest() error { TextGRPCClient = create_files.Delete_EmptyImport(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReadyMain, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyMain, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client_func/grpc_client_func.go b/internal/create_files/grpc_client_func/grpc_client_func.go index 9f8e0d1..2c4a0a0 100644 --- a/internal/create_files/grpc_client_func/grpc_client_func.go +++ b/internal/create_files/grpc_client_func/grpc_client_func.go @@ -6,7 +6,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -85,7 +85,7 @@ func CreateFileGRPCClientFunc() error { } //запись файла - err = os.WriteFile(FilenameReadyGRPCClientFunc, []byte(TextGRPCClientFunc), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCClientFunc, []byte(TextGRPCClientFunc), config.Settings.FILE_PERMISSIONS) return err } @@ -137,7 +137,7 @@ func CreateFileGRPCClientFuncTest() error { } //запись файла - err = os.WriteFile(FilenameReadyGRPCClientFunc, []byte(TextGRPCClientFunc), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCClientFunc, []byte(TextGRPCClientFunc), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client_tables/grpc_client_tables_cache.go b/internal/create_files/grpc_client_tables/grpc_client_tables_cache.go index dfd939b..63c25d3 100644 --- a/internal/create_files/grpc_client_tables/grpc_client_tables_cache.go +++ b/internal/create_files/grpc_client_tables/grpc_client_tables_cache.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -107,7 +106,7 @@ func CreateFiles_GRPC_Client_Cache(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReadyGRPCClient, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCClient, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } @@ -203,7 +202,7 @@ func CreateFiles_GRPC_Client_Cache_Test(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReadyCache, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCache, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client_tables/grpc_client_tables_crud.go b/internal/create_files/grpc_client_tables/grpc_client_tables_crud.go index 258cc79..0e78f2e 100644 --- a/internal/create_files/grpc_client_tables/grpc_client_tables_crud.go +++ b/internal/create_files/grpc_client_tables/grpc_client_tables_crud.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -114,7 +113,7 @@ func CreateFiles(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReadyGRPCClient, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCClient, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } @@ -209,7 +208,7 @@ func CreateFiles_Test(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReadyGRPCClient, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCClient, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client_tables/grpc_client_tables_findby.go b/internal/create_files/grpc_client_tables/grpc_client_tables_findby.go index bb41564..e8992f5 100644 --- a/internal/create_files/grpc_client_tables/grpc_client_tables_findby.go +++ b/internal/create_files/grpc_client_tables/grpc_client_tables_findby.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -118,7 +117,7 @@ func CreateFiles_FindBy(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } @@ -281,7 +280,7 @@ func CreateFiles_FindBy_Test(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client_tables/grpc_client_tables_findmassby.go b/internal/create_files/grpc_client_tables/grpc_client_tables_findmassby.go index 2c52dd0..5771400 100644 --- a/internal/create_files/grpc_client_tables/grpc_client_tables_findmassby.go +++ b/internal/create_files/grpc_client_tables/grpc_client_tables_findmassby.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -118,7 +117,7 @@ func CreateFiles_FindMassBy(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } @@ -288,7 +287,7 @@ func CreateFiles_FindMassBy_Test(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client_tables/grpc_client_tables_readall.go b/internal/create_files/grpc_client_tables/grpc_client_tables_readall.go index 58e49c5..6cb8337 100644 --- a/internal/create_files/grpc_client_tables/grpc_client_tables_readall.go +++ b/internal/create_files/grpc_client_tables/grpc_client_tables_readall.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -118,7 +117,7 @@ func CreateFiles_ReadAll(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } @@ -246,7 +245,7 @@ func CreateFiles_ReadAll_Test(Table1 *types.Table) error { TextGRPCClient = create_files.Delete_EmptyLines(TextGRPCClient) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCClient), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/grpc_client_tables/grpc_client_tables_update.go b/internal/create_files/grpc_client_tables/grpc_client_tables_update.go index 262f66a..ec39168 100644 --- a/internal/create_files/grpc_client_tables/grpc_client_tables_update.go +++ b/internal/create_files/grpc_client_tables/grpc_client_tables_update.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "sort" "strings" @@ -113,7 +112,7 @@ func CreateFiles_UpdateEveryColumn(Table1 *types.Table) error { TextGRPC_Client = create_files.Delete_EmptyLines(TextGRPC_Client) //запись файла - err = os.WriteFile(FilenameReadyGRPC_ClientUpdate, []byte(TextGRPC_Client), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPC_ClientUpdate, []byte(TextGRPC_Client), config.Settings.FILE_PERMISSIONS) return err } @@ -299,7 +298,7 @@ func CreateFiles_UpdateEveryColumn_Test(Table1 *types.Table) error { TextGRPC_Client = create_files.Delete_EmptyLines(TextGRPC_Client) //запись файла - err = os.WriteFile(FilenameReadyGRPC_ClientUpdate, []byte(TextGRPC_Client), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPC_ClientUpdate, []byte(TextGRPC_Client), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/main_file/main_file.go b/internal/create_files/main_file/main_file.go index de58160..e754ed7 100644 --- a/internal/create_files/main_file/main_file.go +++ b/internal/create_files/main_file/main_file.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -84,7 +83,7 @@ func CreateFileMain() error { TextMain = create_files.Delete_EmptyImport(TextMain) //запись файла - err = os.WriteFile(FilenameReadyMain, []byte(TextMain), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyMain, []byte(TextMain), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/makefile/makefile.go b/internal/create_files/makefile/makefile.go index 5c608e2..d1f1c17 100644 --- a/internal/create_files/makefile/makefile.go +++ b/internal/create_files/makefile/makefile.go @@ -5,7 +5,7 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" + "os" "strings" ) @@ -68,7 +68,7 @@ func CreateMakefile() error { TextMakefile = ReplaceVariable(TextMakefile, VariableName, Value) //запись файла - err = os.WriteFile(FilenameReadyMakefile, []byte(TextMakefile), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyMakefile, []byte(TextMakefile), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/nrpc_client/nrpc_client_client.go b/internal/create_files/nrpc_client/nrpc_client_client.go index 4f87a21..71d6223 100644 --- a/internal/create_files/nrpc_client/nrpc_client_client.go +++ b/internal/create_files/nrpc_client/nrpc_client_client.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -79,7 +78,7 @@ func CreateNRPCClient() error { TextNRPCClient = create_files.Delete_EmptyImport(TextNRPCClient) //запись файла - err = os.WriteFile(FilenameReadyNRPC, []byte(TextNRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyNRPC, []byte(TextNRPCClient), config.Settings.FILE_PERMISSIONS) return err } @@ -136,7 +135,7 @@ func CreateNRPCClient_Test() error { TextNRPCClient = create_files.Delete_EmptyImport(TextNRPCClient) //запись файла - err = os.WriteFile(FilenameReadyNRPC, []byte(TextNRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyNRPC, []byte(TextNRPCClient), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/nrpc_client_tables/nrpc_client_tables.go b/internal/create_files/nrpc_client_tables/nrpc_client_tables.go index b1aed09..8a4f77c 100644 --- a/internal/create_files/nrpc_client_tables/nrpc_client_tables.go +++ b/internal/create_files/nrpc_client_tables/nrpc_client_tables.go @@ -113,7 +113,7 @@ package nrpc_client_tables // TextNRPCClient = create_files.DeleteEmptyImport(TextNRPCClient) // // //запись файла -// err = os.WriteFile(FilenameReadyNRPCClient, []byte(TextNRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) +// err = os.WriteFile(FilenameReadyNRPCClient, []byte(TextNRPCClient), config.Settings.FILE_PERMISSIONS) // // return err //} @@ -193,7 +193,7 @@ package nrpc_client_tables // TextNRPCClient = create_files.DeleteEmptyImport(TextNRPCClient) // // //запись файла -// err = os.WriteFile(FilenameReadyNRPCClient, []byte(TextNRPCClient), fs.FileMode(config.Settings.FILE_PERMISSIONS)) +// err = os.WriteFile(FilenameReadyNRPCClient, []byte(TextNRPCClient), config.Settings.FILE_PERMISSIONS) // // return err //} diff --git a/internal/create_files/protobuf/protobuf.go b/internal/create_files/protobuf/protobuf.go index 9b3a977..0482750 100644 --- a/internal/create_files/protobuf/protobuf.go +++ b/internal/create_files/protobuf/protobuf.go @@ -8,7 +8,6 @@ import ( "github.com/ManyakRus/crud_generator/pkg/dbmeta" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "sort" "strconv" @@ -129,7 +128,7 @@ func CreateFileProto(MapAll map[string]*types.Table) error { TextProto = create_files.Delete_EmptyLines(TextProto) //запись файла - err = os.WriteFile(FilenameReadyProto, []byte(TextProto), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyProto, []byte(TextProto), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/readme_file/readme_file.go b/internal/create_files/readme_file/readme_file.go index a37cbe4..4f6c577 100644 --- a/internal/create_files/readme_file/readme_file.go +++ b/internal/create_files/readme_file/readme_file.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -63,7 +62,7 @@ func CreateReadmeMD() error { TextReadmeFile = strings.ReplaceAll(TextReadmeFile, CrudStarterURLOld, CrudStarterURL) //запись файла - err = os.WriteFile(FilenameReadyReadmeFile, []byte(TextReadmeFile), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyReadmeFile, []byte(TextReadmeFile), config.Settings.FILE_PERMISSIONS) return err } @@ -101,7 +100,7 @@ func CreateReadmeRus() error { TextReadmeFile = strings.ReplaceAll(TextReadmeFile, CrudStarterURLOld, CrudStarterURL) //запись файла - err = os.WriteFile(FilenameReadyReadmeFile, []byte(TextReadmeFile), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyReadmeFile, []byte(TextReadmeFile), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_func/server_grpc_func.go b/internal/create_files/server_grpc_func/server_grpc_func.go index 1a1445e..411dc16 100644 --- a/internal/create_files/server_grpc_func/server_grpc_func.go +++ b/internal/create_files/server_grpc_func/server_grpc_func.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" ) @@ -76,7 +75,7 @@ func CreateServerGRPCFunc() error { TextGRPCFunc = create_files.Delete_EmptyImport(TextGRPCFunc) //запись файла - err = os.WriteFile(FilenameReadyServerGRPCFunc, []byte(TextGRPCFunc), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyServerGRPCFunc, []byte(TextGRPCFunc), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_starter/server_grpc_starter.go b/internal/create_files/server_grpc_starter/server_grpc_starter.go index 21e6700..35860b1 100644 --- a/internal/create_files/server_grpc_starter/server_grpc_starter.go +++ b/internal/create_files/server_grpc_starter/server_grpc_starter.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -85,7 +84,7 @@ func CreateFiles_ServerGRPCStarter() error { TextGRPCStarter = create_files.Delete_EmptyImport(TextGRPCStarter) //запись файла - err = os.WriteFile(FilenameReadyMain, []byte(TextGRPCStarter), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyMain, []byte(TextGRPCStarter), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_tables/server_grpc_tables_cache.go b/internal/create_files/server_grpc_tables/server_grpc_tables_cache.go index 3607c20..a1be379 100644 --- a/internal/create_files/server_grpc_tables/server_grpc_tables_cache.go +++ b/internal/create_files/server_grpc_tables/server_grpc_tables_cache.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -102,7 +101,7 @@ func CreateFiles_Cache(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyImport(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReadyCache, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCache, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } @@ -186,7 +185,7 @@ func CreateFiles_Cache_Test(Table1 *types.Table) error { TextGRPCServer = create_files.AddSkipNow(TextGRPCServer, Table1) //запись файла - err = os.WriteFile(FilenameReadyCache, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyCache, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_tables/server_grpc_tables_crud.go b/internal/create_files/server_grpc_tables/server_grpc_tables_crud.go index eed5b2d..5f6a2af 100644 --- a/internal/create_files/server_grpc_tables/server_grpc_tables_crud.go +++ b/internal/create_files/server_grpc_tables/server_grpc_tables_crud.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "sort" "strings" @@ -97,7 +96,7 @@ func CreateFiles(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyImport(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReadyGRPCServer, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCServer, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } @@ -195,7 +194,7 @@ func CreateFiles_Test(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyImport(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReadyGRPCServer, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCServer, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_tables/server_grpc_tables_findby.go b/internal/create_files/server_grpc_tables/server_grpc_tables_findby.go index dea9c41..2c835b1 100644 --- a/internal/create_files/server_grpc_tables/server_grpc_tables_findby.go +++ b/internal/create_files/server_grpc_tables/server_grpc_tables_findby.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -106,7 +105,7 @@ func CreateFiles_FindBy(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } @@ -270,7 +269,7 @@ func CreateFiles_FindBy_Test(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_tables/server_grpc_tables_findmassby.go b/internal/create_files/server_grpc_tables/server_grpc_tables_findmassby.go index edb22f8..8ccbaf3 100644 --- a/internal/create_files/server_grpc_tables/server_grpc_tables_findmassby.go +++ b/internal/create_files/server_grpc_tables/server_grpc_tables_findmassby.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -106,7 +105,7 @@ func CreateFiles_FindMassBy(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } @@ -278,7 +277,7 @@ func CreateFiles_FindMassBy_Test(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_tables/server_grpc_tables_readall.go b/internal/create_files/server_grpc_tables/server_grpc_tables_readall.go index 3c4e1e9..2ef3970 100644 --- a/internal/create_files/server_grpc_tables/server_grpc_tables_readall.go +++ b/internal/create_files/server_grpc_tables/server_grpc_tables_readall.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -106,7 +105,7 @@ func CreateFiles_ReadAll(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } @@ -231,7 +230,7 @@ func CreateFiles_ReadAll_Test(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReady, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_grpc_tables/server_grpc_tables_update.go b/internal/create_files/server_grpc_tables/server_grpc_tables_update.go index 0e541a2..fde5fa6 100644 --- a/internal/create_files/server_grpc_tables/server_grpc_tables_update.go +++ b/internal/create_files/server_grpc_tables/server_grpc_tables_update.go @@ -7,7 +7,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "sort" "strings" @@ -101,7 +100,7 @@ func CreateFiles_UpdateEveryColumn(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReadyGRPCServerUpdateFunc, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCServerUpdateFunc, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } @@ -294,7 +293,7 @@ func CreateFiles_UpdateEveryColumn_Test(Table1 *types.Table) error { TextGRPCServer = create_files.Delete_EmptyLines(TextGRPCServer) //запись файла - err = os.WriteFile(FilenameReadyGRPCServerUpdate, []byte(TextGRPCServer), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyGRPCServerUpdate, []byte(TextGRPCServer), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/server_nrpc_starter/server_nrpc_starter.go b/internal/create_files/server_nrpc_starter/server_nrpc_starter.go index 0e840d9..87c9baf 100644 --- a/internal/create_files/server_nrpc_starter/server_nrpc_starter.go +++ b/internal/create_files/server_nrpc_starter/server_nrpc_starter.go @@ -6,7 +6,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/folders" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "strings" ) @@ -86,7 +85,7 @@ func CreateFile_ServerGRPCStarter() error { TextNRPCStarter = create_files.Delete_EmptyImport(TextNRPCStarter) //запись файла - err = os.WriteFile(FilenameReadyMain, []byte(TextNRPCStarter), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyMain, []byte(TextNRPCStarter), config.Settings.FILE_PERMISSIONS) return err } diff --git a/internal/create_files/tables_tables/tables_tables.go b/internal/create_files/tables_tables/tables_tables.go index 1e5cace..e635fab 100644 --- a/internal/create_files/tables_tables/tables_tables.go +++ b/internal/create_files/tables_tables/tables_tables.go @@ -8,7 +8,6 @@ import ( "github.com/ManyakRus/crud_generator/internal/types" "github.com/ManyakRus/starter/log" "github.com/ManyakRus/starter/micro" - "io/fs" "os" "sort" "strings" @@ -118,7 +117,7 @@ func CreateFiles_Table_struct(Table1 *types.Table, DirTemplatesTable, DirReadyTa TextModel = create_files.Delete_EmptyImport(TextModel) //запись файла - err = os.WriteFile(FilenameReadyModel, []byte(TextModel), fs.FileMode(config.Settings.FILE_PERMISSIONS)) + err = os.WriteFile(FilenameReadyModel, []byte(TextModel), config.Settings.FILE_PERMISSIONS) return err }