1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2025-02-09 11:23:47 +02:00

сделал ReadAll()

This commit is contained in:
Nikitin Aleksandr 2024-09-17 17:38:53 +03:00
parent 8089fd84c9
commit 95eb01a2ca
4 changed files with 17 additions and 18 deletions

View File

@ -135,7 +135,8 @@ func CreateFiles_ReadAll_Table1(Table1 *types.Table, TextTemplateFunction string
func AddInterfaces_ReadAll(TextModel string, Table1 *types.Table) string {
Otvet := TextModel
if len(types.MapReadAll) == 0 {
_, ok := types.MapReadAll[Table1]
if ok == false {
return Otvet
}

View File

@ -129,7 +129,6 @@ func CreateFiles_ReadAll_Table(Table1 *types.Table, TextTemplateFunction string)
_, ok := types.MapReadAll[Table1]
if ok == false {
Otvet = TextTemplateFunction
return Otvet
}
@ -258,7 +257,6 @@ func CreateFiles_ReadAll_Test_Table(Table1 *types.Table, TextTemplateFunction st
_, ok := types.MapReadAll[Table1]
if ok == false {
Otvet = TextTemplateFunction
return Otvet
}

View File

@ -9,21 +9,23 @@ import (
func FindText_ReadAll(TextProto string, Table1 *types.Table) (TextProtoNew string, TextAdd string) {
TextProtoNew = TextProto
TextAdd = ""
for Table1, _ := range types.MapReadAll {
Text1 := FindText_ReadAll1(Table1)
//проверим такой текст уже есть
pos1 := strings.Index(TextProto, Text1)
if pos1 >= 0 {
continue
}
//
TextAdd = TextAdd + Text1
_, ok := types.MapReadAll[Table1]
if ok == false {
return
}
TextAdd = ""
Text1 := FindText_ReadAll1(Table1)
//проверим такой текст уже есть
pos1 := strings.Index(TextProto, Text1)
if pos1 >= 0 {
return
}
//
TextAdd = TextAdd + Text1
return TextProtoNew, TextAdd
}

View File

@ -117,7 +117,6 @@ func CreateFiles_ReadAll_Table(Table1 *types.Table, TextTemplateFunction string)
_, ok := types.MapReadAll[Table1]
if ok == false {
Otvet = TextTemplateFunction
return Otvet
}
@ -243,7 +242,6 @@ func CreateFiles_ReadAll_Test_Table(Table1 *types.Table, TextTemplateFunction st
_, ok := types.MapReadAll[Table1]
if ok == false {
Otvet = TextTemplateFunction
return Otvet
}