As i have not found in Close() function with *gorm instance, any help would be appreciated
dbURI := fmt.Sprintf("user=%s password=%s dbname=%s port=%s sslmode=%s TimeZone=%s",
"username", "password", "dbname", "5432", "disable", "Asia/Kolkata")
fmt.Println(dbURI)
connection, err := gorm.Open(postgres.Open(dbURI), &gorm.Config{})
if err != nil {
fmt.Println("Error connecting database")
panic(err.Error())
} else {
fmt.Println("Connected to database")
}
Note: connection.Close() is not available for GORM 1.20.0