import ( "github.com/jinzhu/gorm" _ "github.com/jinzhu/gorm/dialects/mysql" ) func main() { db, err := gorm.Open("mysql", "user:password@/dbname?charset=utf8&parseTime=True&loc=Local") defer db.Close() if err != nil { panic("failed to connect database") } // Create a new record in the users table user := User{Name: "John Doe", Email: "[email protected]"} db.Create(&user) // Describe record var retrieveUser User db.Where("name = ?", "John Doe").First(&retrieveUser) // Update record db.Model(&user).Update("name", "Johnny") // Delete record db.Delete(&user) }In this example, we create a new user record in the "users" table by calling the Create function with a reference to the user struct. We then retrieve the user record by calling the First function with a Where clause. We update the record by calling the Update function and deleting the record by calling the Delete function. Overall, the gorm library simplifies database operations in Go and makes it easy to work with different databases.