mirror of
https://github.com/ManyakRus/crud_generator.git
synced 2024-12-16 21:52:42 +02:00
36 lines
826 B
Go
36 lines
826 B
Go
package main
|
|
|
|
import (
|
|
"github.com/ManyakRus/crud_generator/internal/config"
|
|
"github.com/ManyakRus/crud_generator/internal/constants"
|
|
"github.com/ManyakRus/crud_generator/internal/logic"
|
|
"github.com/ManyakRus/crud_generator/pkg/graphml"
|
|
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()
|
|
|
|
postgres_gorm.StartDB()
|
|
postgres_gorm.GetConnection().Logger.LogMode(1)
|
|
|
|
graphml.StartReadFile()
|
|
|
|
FileName := config.Settings.FILENAME_GRAPHML
|
|
log.Info("file graphml: ", FileName)
|
|
log.Info("postgres host: ", postgres_gorm.Settings.DB_HOST)
|
|
ok := logic.StartFillAll(FileName)
|
|
if ok == false {
|
|
println(constants.TEXT_HELP)
|
|
}
|
|
|
|
}
|