mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2024-11-21 05:05:52 +02:00
сделал убрал из constants
This commit is contained in:
parent
b18eae139b
commit
564002f84b
@ -34,4 +34,6 @@ func StartApp() {
|
||||
println(constants.TEXT_HELP)
|
||||
}
|
||||
|
||||
log.Info("stop app")
|
||||
|
||||
}
|
||||
|
@ -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"
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
//}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user