▲ | zimpenfish a day ago | ||||||||||||||||
> wouldn't the obvious way be to make the private field private (lowercase)? That may break other things - `gorm`, for example, will ignore private fields - inconvenient if you want to serialise `User` to your DB. | |||||||||||||||||
▲ | CactusRocket a day ago | parent | next [-] | ||||||||||||||||
If you use the same struct in both an HTTP API and an ORM, you're Doing It Wrong in my opinion. These should be completely separated. Exactly to prevent accidental leaking or injection of data. | |||||||||||||||||
| |||||||||||||||||
▲ | CafeRacer 4 hours ago | parent | prev [-] | ||||||||||||||||
Humanity should ignore gorm in all honesty |