Go Series: Learning How to Build a Web Service Using Go from Scratch Pt. 11 — Gorm and Repos

Jonathan Chao
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…

--

--

Jonathan Chao

I am a software developer who has been in this industry for close to a decade. I share my experience to people who are or want to get into the industry