Minimizing Golang struct types while observing tyep safety
Asked chat gpt the following conundrum, if I’m using Go struct types to model a data type, matching a table in my postgresql database say, type Merchant struct { id int, created_at time.Time, name string, phone string, email string, } I have the following question, does it make sense that I ended up creating different types also for the HTTP request to create this merchant, type CreateMerchantRequest struct { name string, phone string, email string, } since the id and created_at timestamps are populated automatically, and also another to update the merchant,...