Set unique name for table in gorm
type user struct {
ID int
Username string `gorm:"size:255"`
Name string `gorm:"size:255"`
}
I want to create a "user" of a table using this model. But the table name is automatically set to "users". I know this is the default behavior for gorm. But I want the table name to be "user".
+3
source to share