Go Series: Learning How to Build a Web Service Using Go from Scratch Pt. 11 — Gorm and Repos
4 min readJun 16, 2023
Last time we’ve created a model that we can use to marshal and unmarshal for JSON. It also acts as the object part of ORM for GORM.
type User struct {
UUID string `gorm:"primaryKey"`
Name string `gorm:"column:user_name"` // set name to `user_name`
Email *string…