1
0
mirror of https://github.com/ManyakRus/crud_generator.git synced 2024-12-20 12:30:52 +02:00
crud_generator/internal/main.go

37 lines
836 B
Go
Raw Normal View History

2023-09-28 16:45:44 +02:00
package main
import (
"github.com/ManyakRus/crud_generator/internal/config"
"github.com/ManyakRus/crud_generator/internal/constants"
2023-10-25 15:38:35 +02:00
"github.com/ManyakRus/crud_generator/internal/folders"
2023-10-24 17:03:04 +02:00
"github.com/ManyakRus/crud_generator/internal/load_configs"
2023-09-28 16:45:44 +02:00
"github.com/ManyakRus/crud_generator/internal/logic"
ConfigMain "github.com/ManyakRus/starter/config"
"github.com/ManyakRus/starter/log"
"github.com/ManyakRus/starter/postgres_gorm"
)
func main() {
StartApp()
}
func StartApp() {
ConfigMain.LoadEnv()
config.FillSettings()
config.FillFlags()
2023-10-24 17:03:04 +02:00
load_configs.LoadMappingsAll()
2023-09-28 16:45:44 +02:00
postgres_gorm.StartDB()
postgres_gorm.GetConnection().Logger.LogMode(1)
2023-10-25 15:38:35 +02:00
folders.CreateAllFolders()
2023-09-28 16:45:44 +02:00
log.Info("postgres host: ", postgres_gorm.Settings.DB_HOST)
2023-10-25 13:52:49 +02:00
err := logic.StartFillAll()
if err != nil {
2023-09-28 16:45:44 +02:00
println(constants.TEXT_HELP)
}
}