package main import ( "go-crud/initializers" "go-crud/models" ) func init() { initializers.LoadEnvVariables() initializers.ConnectToDB() } func main() { initializers.DB.AutoMigrate(&models.Post{}) initializers.DB.AutoMigrate(&models.News{}) }