Jnn
0
Q:

check if gorm created successfully

if err := db.Create(&Animal{Name: "Giraffe"}).Error; err != nil {
   // Create failed, do something e.g. return, panic etc.
   return 
}
0

New to Communities?

Join the community